Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

OnMouseOver Image change and Hyperlink in PHP?

Is there an equivalent or am I stuck to Javascript?



7:13 am on Nov 3, 2001 (gmt 0)

Inactive Member
Account Expired


Good morning guys and gals! (It's 7am - someone remind me why I'm up again! Please),

What I'm after today is somewhat easier than my Top 5 table from a while back (which I still haven't finished, but don't worry I haven't forgot about it, I'm just rethinking how I'm going to use it!).

What I need is a script (ideally in PHP if this is possible) which lets me do 3 things:

1) Preload images for a menu
2) Preload onMouseOver images for that same menu and...
3) Give each of these images a hyperlink

I was thinking along the line of using 1 function for all three, but i don't know where to start....

function menu(ImageOff, ImageOn, URL);

Any ideas if this onMouseOver is possible in PSP or am I stuck in Javascript. Currently I'm using dreamweaver's (Boo, Hiss, I hear you cry) menu creater script, which is performing it's job but it's quite ugly! I'd rather have an easier to use script.


All help appreciated as always,



11:22 am on Nov 5, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 6, 2000
votes: 0

You can only do rollovers client-side (ie Javascript). You could, of course, use PHP to generate the JS code to be sent to the browser, but it's another layer of complexity that might be best avoided unless you've a good reason to do it.

Writing a function that takes the image names etc as parameters and spits out the correct JS could be a timesaver, though...