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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If Else statement?

Status
Not open for further replies.

robdunfey

Technical User
Apr 26, 2002
110
0
0
GB
I am in a bit of a muddle. I have a zoom in and a zoom out button. If the user clicks zoom in I want the browser to respond to on click functions defined in a js file I have made called zoom in, if they click on zoom out, I want the browser to respond to click events etc as defined in my zoom out js file. Does this make sense, is this the most logical way for it to work? And how would one go about doing this? Any help much appreciated.
 
Hi Rob,

You can use the
Code:
onClick
option in the button Like the following to invoke your .js file:

Code:
<INPUT name=&quot;ZoomIn&quot; type=&quot;reset&quot; onClick=&quot;/scripts.js/zoom_in();&quot; value=&quot;Zoom in&quot;>
<INPUT name=&quot;ZoomOut&quot; type=&quot;reset&quot; onClick=&quot;/scripts.js/zoom_Out();&quot; value=&quot;Zoom out&quot;>

Good luck!
 
Hi Rob,

You can use the
Code:
onClick
option in the button Like the following to invoke your .js file:

Code:
<INPUT name=&quot;ZoomIn&quot; type=&quot;Button&quot; onClick=&quot;/scripts.js/zoom_in();&quot; value=&quot;Zoom in&quot;>
<INPUT name=&quot;ZoomOut&quot; type=&quot;Button&quot; onClick=&quot;/scripts.js/zoom_Out();&quot; value=&quot;Zoom out&quot;>

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top