ker11
08-23-2003, 06:24 PM
Hello...
I found a window popup maker at javascript.internet.com created by Nic Wolfe. I used it and it created a popup for me which I placed according to his directions in my document. When I run it I get an error. Can someone help me with it?
I'm trying to learn javascript as fast as I can but it is a slow pace for me.
The following is what I placed between the <head></head> tags in my document:
<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=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=250,left = 387,top = 259');");
}
// End -->
</script>
The following is in the body section of my document:
<A HREF="javascript:popUp('http://www.bible.org/cgi-bin/netbible.p1?book=luk&chapter=1&verse=80')">Luke 1:80</A>
The text shows as being a link and I click on it. Window does popup but that is when I get an error.
Line: 1
Char: 1
Error: Object expected
Code: 0
URL: javascript:popUp('http://www.bible.org/cgi-bin/netbible.p1?book=luk&chapter=1&verse=80')
That is the error I get....
If you can see what it is I'm doing wrong and let me know I would be very grateful. I am new at javascript and desire very much to continue learning about it.
I tried several different url's to make sure I was not putting in an erroreous one but I get the same result each time.
Sincerely,
ker11
I found a window popup maker at javascript.internet.com created by Nic Wolfe. I used it and it created a popup for me which I placed according to his directions in my document. When I run it I get an error. Can someone help me with it?
I'm trying to learn javascript as fast as I can but it is a slow pace for me.
The following is what I placed between the <head></head> tags in my document:
<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=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=250,left = 387,top = 259');");
}
// End -->
</script>
The following is in the body section of my document:
<A HREF="javascript:popUp('http://www.bible.org/cgi-bin/netbible.p1?book=luk&chapter=1&verse=80')">Luke 1:80</A>
The text shows as being a link and I click on it. Window does popup but that is when I get an error.
Line: 1
Char: 1
Error: Object expected
Code: 0
URL: javascript:popUp('http://www.bible.org/cgi-bin/netbible.p1?book=luk&chapter=1&verse=80')
That is the error I get....
If you can see what it is I'm doing wrong and let me know I would be very grateful. I am new at javascript and desire very much to continue learning about it.
I tried several different url's to make sure I was not putting in an erroreous one but I get the same result each time.
Sincerely,
ker11