Click to See Complete Forum and Search --> : Java Pop-Up Window does not work on server
I have pasted a javascript on a webpage to generate a pop-up window. The script works on my computer (preview in browser) but does not appear to work when I upload to my webhost server. Any help would be greatly appreciated.
--fjc
<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by: Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL: http://fineline.xs.mw -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function popUp(URL) {day = new Date();id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=400,left = 262,top = 130');");}
// End -->
</script>
<body style="padding-left: 20" onLoad="javascript:popUp('http://www.pettiboneresort.com/open_5_01_04.htm')">
96turnerri
12-02-2003, 12:47 PM
theres is no reason for js not to run on server, one thing remove the language attribute and add type attibute
requestcode
12-02-2003, 12:58 PM
I uploaded your code to my server and it worked. Do you have a popup blocker installed on your PC?
Thank you very much for your quick reply...
I assume this is what you meant (I am a js novice)
<SCRIPT TYPE="text/javascript">
this had no effect.
My hosting coming is stonewalling me, saying that js is enabled so there should be no issue there.
I am developing in FrontPage2003.
Any other direction?
Thanks
--fjc
I do have a pop-up (norton) but disabled it. Also, I would have thought that It would not have worked in preview in browser if that was interfereing.
I do appreciate that you tried it on your server. I have to suspect my web host server.
do you agree?
--fjc
96turnerri
12-02-2003, 02:18 PM
well thats the only other thing i can think of that it could be although i have never come accross a host that has js disabled hmmm :confused:
requestcode
12-02-2003, 02:22 PM
Is this the only page that you have a javascript on? You might create a page with a simple alert upload that and try it. If it does not work then I suspect that the host is the problem. Also, can you give us link to the page in question? Maybe something else is interfering with the script.
olerag
12-02-2003, 02:41 PM
What's the "eval()" for?? Netscape functionality??
Lots of "popups" (and, of course, popup stopper stuff) in
this forum. Hate em (popups, that is -- forcing something
on someone and, I think, it to be a very impolite imposition.
"fredmv" has a nice bit of code/advice for creating new
windows in the 19 Nov thread named "Trying To Open
New Window" submitted by "kenmurrah".
96turnerri
12-02-2003, 02:51 PM
WOW! thats one of the most clear and concise posts ive seen, although i didnt learn anything good to read :p
heres the url of that post talked about above
http://forums.webdeveloper.com/showthread.php?s=&threadid=21793
Thank you all for your help.
I will try the script again later, but I ran out of time, so I just posted the window as a click-through page.
I think it might be better, with the proliferation of pop-up blockers, they may not be the best way to get our message across.
Thanks again for all your help.
--fjc