| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 14806 | 2002-01-19 15:00:00 | Webpages and window.open() | Guest (0) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 31934 | 2002-01-19 15:00:00 | Can I use the window.open() command to open the a page in the same window? I've looked at many examples but none open in the same page. Or is there another way I can do this because I want a page to load depending on the browser. I know a bit of HTML and Javascript. Thanks in advance |
Guest (0) | ||
| 31935 | 2002-01-19 15:45:00 | Or is it better to use a refresh meta tag if it's possible? | Guest (0) | ||
| 31936 | 2002-01-19 19:34:00 | Don't quote me as I'm just starting to learn HTML but.. You could probably use some form of browser sniffer in Java. e.g. <script type='text/javascript'> <!-- hide the script from old browsesr var MTMUsableBrowser = false; // browser sniffing routine browserName = navigator.appName; browserVersion = parseInt(navigator.appVersion); if(browserName == 'Netscape' && browserVersion >= 3) { MTMUsableBrowser = (navigator.userAgent.indexOf('Opera') == -1) ? true : false; } else if(browserName == 'Microsoft Internet Explorer' && browserVersion >= 4) { MTMUsableBrowser = true; } else if(browserName == 'Opera' && browserVersion >= 5) { MTMUsableBrowser = true; } Not sure how helpful this will be. |
Guest (0) | ||
| 31937 | 2002-01-19 19:53:00 | Sorry forgot the last, I think I misconstrued your meaning. If you want to open a another window on same page there is good documentation here. www.htmlgoodies.com Scroll down to 'Page Inside A Page' cheers |
Guest (0) | ||
| 31938 | 2002-01-20 01:37:00 | Hi, hopefully this is what you want to do: have a popup open and be able to load a new file into that popup from another page (well if it isnt too bad :P ) you can use a target='NewWin' in your main doc to open a new window (or use a JS code to open it), then you can use the same target='NewWin' in your link tag on any page to open the file in that new window, and btw the window.open code wont let you open it in the same file (well i cant see a way that it could)...i could be wrong. | Guest (0) | ||
| 31939 | 2002-01-20 05:43:00 | Thanks B M M but I've looked at that site and a few more that used the window.open() command. One of the examples was window.open([sURL][,sNAME]) Where it also had a table showing what you can use as sNAME. One of the commands was '_self' but I think it's only used for frames which I'm not going to have at this stage. I'll try that script you sent above. |
Guest (0) | ||
| 31940 | 2002-01-20 06:52:00 | I did a bit more research but the command I wanted to use is window.location=('URL') which opens the URL in the same page. Thanks for all your help |
Guest (0) | ||
| 1 | |||||