Jump to content

newbie needs javascript help


Johnmitchell

Recommended Posts

Yo, just wandering if i could get some help from you'se experts.a basic example of what i need to do is have two bits of text/links which, when hoverd over, some text/image(s) in anouther div appearso:Text1|Text2when hover over Text1HiWhen no longer hover over Text1 nothingWhen hover over Text2Hi2When no longer hover over Text2 nothing.with me? :) here is what i have so far:

<div>	<a href="#" onmouseover="javascript:Iamhere.innerHTML='Hi';" onmouseout="javascript:Iamhere.innerHTML='';">text 1</a> | <a href="#" onmouseover="javascript:Iamhere.innerHTML='Bye';" onmouseout="javascript:Iamhere.innerHTML='';">text 2</a> <div id="Iamhere"> </div></div>

Thanks in advance for any help - also if my explaination was as crap as i imagine, just say :)

Link to comment
Share on other sites

<div><a href="#" onmouseover="javascript:getElementById('Iamhere').innerHTML='Hi';" onmouseout="javascript:getElementById('Iamhere').innerHTML='';">text 1</a> |<a href="#" onmouseover="javascript:getElementById('Iamhere').innerHTML='Bye';" onmouseout="javascript:getElementById('Iamhere').innerHTML='';">text 2</a><div id="Iamhere"> </div></div>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...