Forum Moderators: open

Message Too Old, No Replies

Create Pop-up without clicking

         

Reikoshea

1:16 am on Mar 23, 2006 (gmt 0)

10+ Year Member



I know at first this is going to sound bad, but really this is just a problem i cannot figure out at all.

My company runs e-mail and snail-mail ad campaigns for many of the top automotive dealerships in TX. A customer recently asked for a mini ad to be e-mailed and then for the ad to go full screen when it is clicked. in this case, call the ads are 956x716 (if the user is set to 1024x768 screen res...if not, it links to the appropriate page).

originally i just put an open.window() in the e-mail, and it worked fine for testing, but when it is actually on the web pop-up blockers go into effect. so i thought, hey, what if i auto-submit a form onload, and this is what i came up with:


<html>
<head>
<title>Classic Chevrolet</title>
<script language="Javascript">
var the_timeout;
function doTimer()
{
the_timeout = setTimeout("document.forms.redirect.submit();", 3000);
}
function newWindow(newContent)
{
winContent = window.open('http://www.example.com/Work/Classic-TahoeAdFinished.html', 'nextWin', 'left=35,top=0,width=956,height=716,toolbar=no,scrollbars=no,resizable=no')
}
function init()
{
doTimer();
}
window.onLoad = init;
</script>
<SCRIPT LANGUAGE="VBScript">
Sub Window_Onload
window.opener = "x"
End Sub
</script>
</head>
<body>
<form onSubmit="newWindow();" name="redirect">
</form>
</body>
</html>

unfortunately, that just sends my browser into an endless loop reloading itself. am i missing this, or is there a better way to get around a nonuser-requested pop-up?

i have the page loaded onto my webserver for testing, and then it will go to the client when complete.

by the way, the VB is there so the user doesnt get the "are you sure you want to close" window with the child kills the parent window. i know it doesnt work in Firefox, and im still trying to figure that out as well...if anyone has any ideas.

*edit* and i have the time out in there so my browser doesnt go hay wire...you can just ignore that.

[edited by: DrDoc at 8:11 pm (utc) on Mar. 25, 2006]
[edit reason] examplified URL [/edit]

Reikoshea

2:32 am on Apr 2, 2006 (gmt 0)

10+ Year Member



this topic got shelved for a while for a link to my website (note to self: read TOS)

just wanted to give it a bump, my deadline is May 1st and this is the only thing i can see holding me back.