need help with mouseover

liunx

Guest
i am working on a friends site, and am trying to make the mouseover command work for the active links... so that the status bar doesnt say <!-- m --><a class="postlink" href="http://www.......">http://www.......</a><!-- m -->. />
<br />
i know the code for that... there is no problem there. however there is already a mouseover command there.... for pictures..... it goes from a black image to a purple image.... on mouseover.... and that image is a link. is there a way to have both mouseover's work at the same time? i cannot figure out how to make it work... can anybody help. the site that i am working on is <!-- w --><a class="postlink" href="http://www.kenemmertdesigns.com">www.kenemmertdesigns.com</a><!-- w --> and the images that i am talking about is where it says safari, angels, etc. thanks again for the help<!--content-->Put the stuff you want to happen on mouseover into a function defined in a short piece of code that you bury in the HEAD of the HTML page, or (even better) which you put in to an external .js file. Make the mouseover call the function rather than just running the one short piece of existing javascript code that you have there.<br />
<br />
External files are done with:<br />
<script type="text/javascript" language="javascript" src=http://www.htmlforums.com/archive/index.php/"file.js"></script><!--content-->Hi CarpeNoctem,<br />
Yes, you can do both, and with little effort to your existing links. Just add your window status code like this to each of your links (note the bold text).<br />
<br />
<br />
<p><a href=http://www.htmlforums.com/archive/index.php/"shop/southwest/index.html" onMouseOver="lighten(1); window.status='Your Text Here';return true;" onMouseOut="darken(1); window.status='';return true;" onClick="return clicked(1)"><img src=http://www.htmlforums.com/archive/index.php/"images/bt_southwest-b.GIF" width=150 height=58 border=0 name="button1"></a></p><br />
<br />
Also note that I have taken the "return" out of your original mouse on and mouse off code.<br />
<br />
Good luck.<!--content-->Originally posted by giz <br />
Put the stuff you want to happen on mouseover into a function defined in a short piece of code that you bury in the HEAD of the HTML page, or (even better) which you put in to an external .js file. Make the mouseover call the function rather than just running the one short piece of existing javascript code that you have there.<br />
<br />
External files are done with:<br />
<script type="text/javascript" language="javascript" src=http://www.htmlforums.com/archive/index.php/"file.js"></script> Where does any of this help CarpeNoctem solve his problem?<!--content-->thank you for your help... i will try it out tonight.<!--content-->>> Where does any of this help CarpeNoctem solve his problem? <<<br />
<br />
<br />
Darn. I only pasted half of my message in. The other bit was to show what was in the external .js file as a function. This way the function is loaded when the page loads by calling it from the script within the HTML HEADer. Calling the function on each link, rather then repeating all the code within each link reduces page bloat. It also makes the code easy to change for all links, as it only needs to be changed in one place, not on each link in turn.<!--content-->well i didnt use the js way.... i added the code the links... and so far it seems to work.... thanks guys.... i havent uploaded it onto the internet yet.....<br />
<br />
but thanks again. if i can help you with anything let me know<!--content-->
 
Back
Top