Click here to Skip to main content
15,891,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this is my code but but this is not as expected


<form id="target" action="destination.html">
<input type="text" value="Hello there">
<input type="submit" value="Go">
</form>

this is js.
C#
$( "#target" ).submit(function( event ) {

event.preventDefault();
});

my code without reloaded page, but not submit single input text field, how to submit input text to browse(chrom) remember this inputtext.
Posted
Comments
Robert Welliever 1-Nov-14 0:52am    
It is difficult to understand your English, but it sounds like you want to asyncronously communicate with the server. You can create and use the XMLHttpRequest object directly or one of its wrappers. I use ICallbackEventHandler interface with ASP or Ajax if I'm not using ASP. Put your async call right before the call to preventDefault().

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900