| Dan Rossi 2006-02-21, 9:56 pm |
| Ive made a small change to the HTML_AJAX.js file in regards to
HTML_AJAX.formSubmit and telling which submit button was click if
multiple submit buttons are in a form. The one that is clicked is sent
only by default in php and scripting lanmguages, but this is sending
the params of all the submit buttons. This change will only send the
clicked submit button. Im wondering how I can make the cvs diff file
and send that for approval ?
Here is the file from the latest svn checkout today
http://www.electroteque.org/pear/HTML_AJAX/HTML_AJAX.js
Its used like
<form action="products.php" method="post" onsubmit="return
!HTML_AJAX.formSubmit(this, 'target');">
<input type="text" name="testing" value="example" />
<select name="test_select">
<option value="example1">Example 1</option>
<option value="example2">Example 2</option>
</select>
<input type="submit" name="add"
onclick="HTML_AJAX.formSubmitBtnOn(this);" value="Add" />
<input type="submit" name="update"
onclick="HTML_AJAX.formSubmitBtnOn(this);" value="Update" />
</form>
Unless there is actually something in the system like events etc, this
worked fine.
Let me know.
Daniel
|