PDA

View Full Version : Here goes- JavaScript question



joelectronic
09-18-2006, 02:09 PM
Damn, this DD website is great lookin', pleasing to the eye.

I'm new to web programming and am building my music website. I would like to add a certain feature and would welcome your help. It goes like this...

On the left side I have rows of text. On the right side, I would have small images for each row. I would like the text leftside to alight when I 'onmouseover' the appropriate rightside image, giving it a corresponding feel. Can this be done?

I suppose it may sound a trivial request and I could just stick with a common link either way but it would add to the flava of my site. My website is not 'googleable' and not fully functional as yet but type it in the address bar (oldskoolin.biz) if you wish.

So, hope you like it and hope anyone out there can help me to make it all the more special. Cheers.

Many thanks, respect to all and Dynamic Drive.

Joe :)

blm126
09-18-2006, 05:59 PM
Not clear on what you mean. Could you describe what you want a little better. What you want is very possible(and not terribly difficult), but I'm not sure on how the page is layed out.

joelectronic
09-18-2006, 11:50 PM
Thanks for your reply,

Yeh, it is a bit difficult to describe, I'll try again.

It's basically like getting a specific piece of text to change colour (like in html 'hover') when passing your mouse over an image that might be miles away, on the other side of the page. The image and text are completely apart yet obviously linked.

So, mouse over the image on the right, the text situated on the left changes colour. I think this would work well with lists of items and accompanying images.

I've seen something that does similar on here: Pass the mouse over written text and an image appears or there's another one for additional text appearing when you mouse over...

For me it's more about getting that 'hover' effect on selected text, but doing this by using individual images as 'triggers'.

Maybe these can be modified although I'm hoping there's an easier way, even with html? I think I've actually done it once but this was a mistake through poor programming or a division left out...

Anyway, hope things are clearer and many thanks if you can help me out.

Hope I won't have to write back and say 'I suck'. Hey Scachi, wassup..! Mind you, it's not to hard to get smoke coming out of your ears man, sympathies to the bigger league, and there's me worrying...

Thanks again,

Joe :)

jscheuer1
09-19-2006, 05:30 AM
<span id="text1">Some text</span>


<img src="some.gif" onmouseover="document.getElementById('text1').style.color='red';" onmouseout="document.getElementById('text1').style.color='';">

joelectronic
09-19-2006, 09:23 AM
Hey, cheers John,

Just looged in and saw some code. Haven't tried it yet but will a.s.a.p. Logically it looks like it will work.

Thanks :)

Joe

joelectronic
09-19-2006, 03:55 PM
Hi there,

Yep, tried it and it works a treat!

It's not being used on my website yet but will be soon. I can assure you I'm doing somersaults at the moment so thanks again John and thanks to Dynamic Drive.

Cheers

Joe:)