Click to See Complete Forum and Search --> : JavaScript for "Eyes"


Jenuine
06-05-2003, 12:45 AM
I've been trying to use the script located at: http://javascript.internet.com/miscellaneous/eyes.html . I'm using it in FrontPage 2000. I used Notepad to write a quick program incorporating this script (just to test it out), and it worked beautifully. However, when I transferred it to Front Page, I get the following error: "Microsoft JScript runtime error: Object doesn't support this property or method was not handled." Is there anyone out there who can help me?

Jenuine
06-05-2003, 10:34 AM
I posted the original message nearly 12 hours ago, and I've had no response. I really would appreciate some help with this.

Jona
06-05-2003, 11:53 AM
Heyo, Jen! :)

This error occurs because you have saved this file as a .js file and you double-clicked it. Instead, you must run this script in a Web page.

Jona

Jenuine
06-05-2003, 12:40 PM
Hey Jona!!

Thanks for the reply....It's good to know that someone cared enough about my problem to help me out. :)

I don't know how I would have saved the file as a .js file. Anyway, when I go to the preview mode in FrontPage, the eyes work SOMETIMES. But sometimes I also get the error message. When I go to preview the page in IE ver 6, I just get the error....even after publishing the sometimes working version.

When I did this last night in notepad, and then previewed in IE, I had no problem whatsoever. I copied everything over, including saving the file in the right place. Why does it work in one place and not the other? :confused:

Jona
06-05-2003, 12:47 PM
Well, first off I'd suggest not ever using FrontPage when you're using someone else's Javascript program. That said, come up with a completely new page (simple page with nothing in it) in Notepad. Then, follow the exact steps provided on the site that provides it.

A lot of times the script works sometimes and other times does not is probably because you have the Javascript translator thingy on (I forget what it's called). This sorts through the JavaScript to make it work even when the code is invalid. So sometimes it works correctly, although causing an error; and sometimes it does not.

Jona

Jenuine
06-05-2003, 01:09 PM
Well, right now, I have no choice but to use FrontPage....that's where the other pages of my website are located.

In FrontPage, the default scripting language is set as JavaScript. My other two choices are "none" or "VBScript". Which one should I use?

Also, when I go to debug, this line is highlighted as the one causing the error:

s = '<DIV ID ="dummy" STYLE="position:absolute; ' + 'top:'+y+'; left:'+x+'; width:10; height:10;"> </DIV>';

Jona
06-05-2003, 01:11 PM
OK, keep it at JavaScript. Let me show you how that line should be coded:


s = '<DIV ID="dummy" STYLE="position:absolute; top:'+y+'; left:'+x+'; width:10; height:10;"> </DIV>';


Jona