Hi all, Where can I find a script which will open a new browser window with a new website when a user visits a certain page n my site? I want user to redirect to another website without leaving the existing one. Is it possible? Thanks
did you try onload? <body onload="window.open('http://www.mydomain.com/file_name.php');return true;"> Code (markup):
Thanks Louie got myself sorted from a visual pop up creater. <!-- TWO STEPS TO INSTALL POPUP WINDOW: 1. Paste the first into the HEAD of your HTML document 2. Use the code to open the popup page on your site --> <!-- STEP ONE: Copy this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Idea by: Nic Wolfe (Nic@) --> <!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=480,left = 640,top = 360');"); } // End --> </script> <!-- STEP TWO: Paste this onLoad event handler into the BODY tag --> <BODY onLoad="javascriptopUp('http://xxx.domain.com')"> <!-- Script Size: 0.73 KB --> I wonder how can I put it in the background rather than coming in the front? Cheers
look into focus <!--body onload='self.focus();'--> <BODY onLoad="javascriptopUp('http://xxx.domain.com');self.focus();"> Code (markup):
Sorry guys if I posted it in the php forums. The existing site is in php so I thought there might be a way to do it in php. Pardon me I am a newbie. Back to the topic, as louie mentioned about focus thing? How can I put it in the background please? Anyone? Thanks