Re: OT - js - determine which submit button was submitted?

2005-09-22 Thread Claude Schneegans
If you really need to have this information on submit on client side, use this: function me(){ alert(submitValue); } function whichButton(button) { submitValue = button.value; } var submitValue; (watch out, if you type "onsubmt", like I stupidly copy'n pasted from your

Re: OT - js - determine which submit button was submitted?

2005-09-22 Thread S . Isaac Dealey
> Hi > Anybody know how to determine which submit button was > pushed in a form with > multiple submit buttons in the onsubmit function in > javascript? > ie > > function me(){ > what to write here to determine if its value 1 or 2? > } > > > > > > > If you tell me to look in the form stru

Re: OT - js - determine which submit button was submitted?

2005-09-22 Thread Marlon Moyer
as long as the submit buttons don't already have an onclick event, you could always include this script at the bottom of the page: tags = document.getElementsByTagName('input') for (var i=0;i

Re: OT - js - determine which submit button was submitted?

2005-09-22 Thread Alan Rother
Instead of using actual submit buttons, you could use input type="button" name="b1" onclick="MySubmitFunction(This.name )" Then you need to create a javascript function that is setup to accept your call and it will inheriently pass in the name of the button as one of the paramete

Re: OT - js - determine which submit button was submitted?

2005-09-22 Thread Charlie Griefer
the only way i can think to do it would be to use button inputs instead of submit inputs, with onclick attributes, submitting the form manually using the submit() method. function me(btn, theform) { alert('You clicked ' + btn); theform.submit(); }

RE: OT - js - determine which submit button was submitted?

2005-09-22 Thread Ian Skinner
I would guess some status check on the m1 and m2 elements in the DOM. I have no idea what that would be, but I'm fairly sure it is there somewhere. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA "C code. C code run. Run code run. Please!" - Cynthia Du

OT - js - determine which submit button was submitted?

2005-09-22 Thread DRE
Hi Anybody know how to determine which submit button was pushed in a form with multiple submit buttons in the onsubmit function in javascript? ie function me(){ what to write here to determine if its value 1 or 2? } If you tell me to look in the form structure, then you didnt read the que