submit a form without refresh
Hello all,
How is it possible to submit a form using javascript, without refreshing the window?
How is it possible to make an http request "behind the scenes" without refreshing the browser? (using document.location.href=<URL> will refresh the window)
thank you,
Rami
For second question, use ajax.
And to submit a form using javascript I think it is:
document.getElementsByTagName('FORM')[0].submit()
Check this Page Out:
In case the site goes down: here's an example:
JavaScript Code:
<script type="text/javascript">
function changeText2(){
var userInput = document.getElementById('userInput').value;
document.getElementById('boldStuff2').innerHTML = userInput;
}
</script>
<p>Welcome to the site <b id='boldStuff2'>dude</b> </p>
<input type='text' id='userInput' value='Enter Text Here' />
<input type='button' onclick='changeText2()' value='Change Text'/>
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks