PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_AJAX » Bug #10256

Reset after submit

Details

Request #10256Reset after submit
Submitted2007-03-03 13:57 UTC
Fromdiduknow at emailplus dot org
StatusBogus
PackageHTML_AJAX
PHP Version4.4.2
OSRed 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