View Single Post
Old 11-16-2012, 10:04 PM   PM User | #5
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,452
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
You could swap the function calls around the other way assuming they are independent of one another.

Code:
<div id="formbuttons"><input class="buttonsubmit" id="btnsubmit" name="btnsubmit" onclick="wrs_trackclick('DCS.dcsuri=formsubmit', 'WT.ti=form submit','WT.dl=24'); return formvalidate(); " type="submit" value="Send"/> </div>
This is an example of why it is better to use event listeners in JavaScript rather than event handlers - you would have been able to add a second submit listener without needing to update any of the already existing code.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote