Jippi
12-06-2004, 01:53 PM
hello,
I have a website and I want to do this;
When someone join, my page will open another new explorer and go to another page.
HTML...
How can I do this?
can you help?
JiPpI Ka
the_pm
12-06-2004, 02:10 PM
In HTML? Add target="_blank" to the link. That will work everywhere, not just "explorer."
If you're writing XHTML Strict or 1.1, I believe target="_blank" won't cut it. You'll need to use JavaScript instead. Here's the correct way to do this - the way that will work even with JavaScript disabled. http://www.htmlhelp.com/faq/html/links.html#window-specify
HTH!
Jippi
12-06-2004, 02:39 PM
danke my friend.
but when someone enter my website, i want to open the new window when the page loading.
the_pm
12-06-2004, 02:44 PM
Use the onload event handler and attach the javascript in the link I gave you to it.
But I would be surprised if it works even one out of 20 times. This will never get past a popup blocker. Bad idea, IMHO
sololo
12-07-2004, 11:20 AM
You can use "_blank" , "_parent" , "_self" or "_top" to handle how your page will load in ie; but as the_pm said, those pop up blockers are nasty sometimes. I just created very cool Virtual Tour in Imageroll and when i view in explorer after temporarily allowing pop up, it rolls ok. But loading on server and checking in cross browser shows empty rolling slots . And its funny posting a message like "Image best viewed by temporarily disabling Pop Up blocking software".
STCFX
12-07-2004, 11:38 AM
This code will give you a new popup window 3 seconds after you page is loaded and will close the window 5 seconds after the new window has loaded.
If you do not want the new window to close just remove that area of the code.
You can also set the width & height of the new window.
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popupWin() {
text = "<html>\n<head>\n<title>Pop Window</title>\n<body>\n";
text += "<center>\n<br>";
text += "My New Windows Contents";
text += "</center>\n</body>\n</html>\n";
setTimeout('windowProp(text)', 3000); // delay 3 seconds before opening
}
function windowProp(text) {
newWindow = window.open('','newWin','width=300,height=100');
newWindow.document.write(text);
setTimeout('closeWin(newWindow)', 5000); // delay 5 seconds before closing
}
function closeWin(newWindow) {
newWindow.close(); // close small window and depart
}
// End -->
</script>
</HEAD>
<BODY onLoad="popupWin()">
I hope this helps. :)
sololo
12-07-2004, 11:41 AM
STFX, will it these go thru pop up blocker?
the_pm
12-07-2004, 11:53 AM
No, it fails. Here's a method that will bypass any popup filter you can find (because it doesn't use a new window), as long as JavaScript is enabled: http://www.plhmedia.com/ex/popthis.html
Because it doesn't call a new window and all of the popup information is store in the same document as the page that calls it, even selective JavaScript filters built into most new browsers won't stop this from working. I think you'll be hardpressed to find a more reliable or efficient method than this. I also think you'll be hardpressed to keep people coming back to your site when they have to deal with popups, but perhaps it makes sense to have them on your site, whatever your site's content may be.
sololo
12-07-2004, 12:35 PM
the_PM,
Thanks, that works ok.