CanMan2004 Posted January 29, 2007 Share Posted January 29, 2007 Hi allI have two onclick actions which look likeonClick="return validate_form ( )";onClick="document.form.action='shop.php';"At the moment I can only use one per button, how can I combine them so that I can run both on one button?Does this make sense?Thanks in advanceDave Quote Link to comment Share on other sites More sharing options...
Iceman512 Posted January 29, 2007 Share Posted January 29, 2007 Hi Dave,I am certainly no JS Genius, but try this:[code]onClick="return validate_form ( ); document.form.action='shop.php';"[/code]Hope that works!Regards, Iceman Quote Link to comment Share on other sites More sharing options...
obsidian Posted January 29, 2007 Share Posted January 29, 2007 In addition to Iceman512's example, you could just include the second JS call within your validate_form() function declaration. Quote Link to comment Share on other sites More sharing options...
CanMan2004 Posted January 29, 2007 Author Share Posted January 29, 2007 Thanks, but sadly none of the above worked, I did manage to useonClick="document.form.action='shop.php';"and then usedonMouseDown="return validate_form ( )";And that seems to work fine.Thanks Quote Link to comment Share on other sites More sharing options...
obsidian Posted January 29, 2007 Share Posted January 29, 2007 CanMan, what are you trying to accomplish with the two JS arguments? Also, how did you apply the action update within your function? There's no reason why it wouldn't work, as long as you place the adjustment within a true response (and before your function returns). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.