Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onMouseOver

Status
Not open for further replies.

snt

MIS
Jun 19, 2000
104
US
Is it possble to call 2 seperate functions with onMouseOver?<br>There are 2 things i want to happen when the mouse moves over a button, but i am not familiar enough with javascript to combine the 2 functions into one.&nbsp;&nbsp;Any info would be greatly appreciated.
 
you could just have it call one function, then that one function call the two other functions <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Thanks for your response.<br>I think you mean something like:<br><br>function name(){<br>function 1()<br>function 2()<br>}<br><br>If this is correct, would I write:<br><br>// &lt;a href =&quot; - &quot; onmouseover=&quot;name(1)(2)....&quot;&lt;/a&gt;?<br><br>The part that I'm confused with is the part after the &quot;name&quot;. I don't understand how to write this.<br><br>Please excuse my ignorance, I'm new at this.<br>
 
no, should write something like this<br><br>&lt;Script Language=&quot;Javascript&quot;&gt;<br>function runtwo()<br>{<br>&nbsp;function1()<br>&nbsp;function2()<br>}<br><br>function function1()<br>{<br>...<br>}<br>function function2()<br>{<br>...<br>}<br>&lt;/Script&gt;<br><br>&lt;a href =&quot; - &quot; onmouseover=&quot;runtwo()&quot;&lt;/a&gt;?<br><br> <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
if you wanna kepe it simple like this<br>&lt;a href=&quot;&quot; onmouseover=&quot;(handler1);(handler2)&quot;&gt;...&lt;/a&gt;
 
hmm forgot about the semicolons, even closer to C++ than I thought <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Yes _NetWorK_ almost has it correct, it would actually be like this:<br><br>&lt;a href=&quot;&quot; onmouseover=&quot;handler1();handler2()&quot;&gt;...&lt;/a&gt; <br><br>-pete
 
It works beatifully.<br>I can't thank all of you enough for your help.<br><br>Sean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top