Easiest Way To Make A Form Submit Without Refresh

dalleaffogy

New Member
I have been trying to create a simple calculator. Using PHP I managed to get the values from input fields and jump menus from the POST, but of course the form refreshes upon submit.Using Javascript i tried using\[code\]function changeText(){document.getElementById('result').innerHTML = '<?php echo "$result";?>'\[/code\]but this would keep giving an answer of "0" after clicking the button because it could not get values from POST as the form had not been submitted.So I am trying to work out either the Easiest Way to do it via ajax or something similar or to get the selected values on the jump menu's with JavaScript.I have read some of the ajax examples online but they are quite confusing (not familiar with the language)
 
Back
Top