GetDotted Domains

Viewing Thread:
"JS Rollovers"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 18/04/02 at 22:46
Regular
Posts: 787
AH! I've just started liking Javascript again, it's been hard but I think it's nessersary, anyway, my first step to Javascriptdom was to use rollovers on my site:

http://www.geocities.com/enterthefog/pages/template.htm

as you can see, when the Mouseout is operated it forms an error, Javascript is usually quite obvious to edit, but I can't see anything wrong with this, so i'd be very grateful for some help please :)
Sat 20/04/02 at 09:04
Regular
"IT'S ALIVE!!"
Posts: 4,741
simple shmimple it didn't work, not as if I write Javascript now... :)
Sat 20/04/02 at 00:58
Regular
"Pouch Ape"
Posts: 14,499
Why do people insist on making this simple piece of coding so difficult!? Just give your image a name and do this:





See, easy. You put it on one line of course & it works in IE and Nestscape.
Sat 20/04/02 at 00:15
Regular
"yamahapkowner.com"
Posts: 409
frames.... eeeek
Fri 19/04/02 at 21:27
Regular
"IT'S ALIVE!!"
Posts: 4,741
I was hoping your wisdom would be able to help me to use Javascript without running errors on the page, i'll have a look into the second page anyway, just incase some people don't use Javascript...etc

I havn't got round to finishing Gabbo's Javascript script, but no errors came up earlier.

Thanks for your help though, I hadn't thought of a doing a second page guess it makes sense *sigh* which means more work...or frames! AH!
Fri 19/04/02 at 20:14
Regular
"tinycurve.gif"
Posts: 5,857
Very often, the little yellow exclamation mark in the corner causes people to panic when a javascript error occurs, so I would suggest leaving out the image rollovers. If you really want to keep them, though, I would recommend creating a second page without the JS on it, and if the first page throws an error, you are taken to the non-javascript page. It is called an OnError event handler. See http://htmlgoodies.com to find out how.

Just click on "JavaScript", and "Event Handlers" or "The Onerror event handler"
Fri 19/04/02 at 16:54
Regular
"No Surprises Please"
Posts: 2,192
Here is the script I use for rollovers.




------------------

Put that in between your tag and your tag. Then, for the links...

------------------

image1

------------------

You just have to swap different attributes to suit your needs. Remember to change every attribute with the 'image1' thing though. Also, you can have as much images in the first script as possible, for example...

------------------

image1_out = new Image(145,55); image1_out.src = 'image1_out.gif';
image1_over = new Image(145,55); image1_over.src = 'image1_over.gif';
image2_out = new Image(145,55); image2_out.src = 'image2_out.gif';
image2_over = new Image(145,55); image2_over.src = 'image2_over.gif';
image3_out = new Image(145,55); image3_out.src = 'image3_out.gif';
image3_over = new Image(145,55); image3_over.src = 'image3_over.gif';

------------------

Let me know if you have any problems.
Fri 19/04/02 at 09:47
Regular
"IT'S ALIVE!!"
Posts: 4,741
If I take any of the javascript out it decides not to work altogether, thanks anyway, i'll have another go.
messy! you jest :)
Thu 18/04/02 at 23:06
Regular
"l33t cs50r"
Posts: 2,956
It's messy... you could simplify the whole lot with a simple image swap set up and image restore, and keep the names simple, no need for the on/off set up.
Thu 18/04/02 at 22:46
Regular
"IT'S ALIVE!!"
Posts: 4,741
AH! I've just started liking Javascript again, it's been hard but I think it's nessersary, anyway, my first step to Javascriptdom was to use rollovers on my site:

http://www.geocities.com/enterthefog/pages/template.htm

as you can see, when the Mouseout is operated it forms an error, Javascript is usually quite obvious to edit, but I can't see anything wrong with this, so i'd be very grateful for some help please :)

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Excellent support service!
I have always found the support staff to provide an excellent service on every occasion I've called.
Ben
Best Provider
The best provider I know of, never a problem, recommend highly
Paul

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.