Home » HTML » HTML_AJAX » Bug #10256
Reset after submit
Details
| Request #10256 | Reset after submit |
|---|---|
| Submitted | 2007-03-03 13:57 UTC |
| From | diduknow at emailplus dot org |
| Status | Bogus |
| Package | HTML_AJAX |
| PHP Version | 4.4.2 |
| OS | Red Hat |
| Roadmaps | (Not assigned) |
Comments
[2007-03-03 13:57 UTC] diduknow at emailplus dot org
Description:
------------
Once the HTML_AJAX.formSubmit has been submitted, the form that was submitted disappears, replaced by the content it returns.
Test script:
---------------
<script type="text/javascript" src="server.php?client=all"></script>
<form name= "form1" action="output.php" method="post"
onSubmit="return !HTML_AJAX.formSubmit(this, 'output.php');">
<input name="number2" type="text" class="inputstyle" id="number" size="5" maxlength="5"/>
<input type="submit" name="action"
value="go">
</form>
Expected result:
----------------
The form to stay, and the content to be there as well
Actual result:
--------------
The form disappeared leaving the content.
[2007-03-03 13:58 UTC] diduknow at emailplus dot org
(Edited, mistake in title)
[2007-03-03 19:34 UTC] lyaish at php dot net
Thank you for taking the time to write to us, but this is not
a bug.
formSubmit accepts the following arguments:
formSubmit: function (form, target, options)
formSubmit will use the url from the form action attribute
so in your case you should have used something like:
HTML_AJAX.formSubmit(this,'target'), with 'target' being the id of the HTML element that will receive the content returned