Albo jak to zrobić w tym HTML żeby użytkownik nie wiedział że mi się to wysyła
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="ajaxcss.css" rel="stylesheet" type="text/css"> </head> <body> <div id="formDiv" class="mainDiv"> <div> id="tfImie" class="myTextInput"/> </div> id="tfNazwisko" class="myTextInput"/> </div> <div style="width:50%;margin:0 auto;text-align:center;"> <input type="button" value="Wyślij" class="myButton" id="btnWyslij" onclick="wyslijDane();" style="margin-top:10px;" /> </div> </div> </body> </html>
function SendRequest() { var req = mint.Request(); req.OnSuccess = function() { $("response").innerHTML = this.responseText; } req.SendForm("form"); }
<form id="form" method="POST" action="form_post.php"> Pole tekstowe: <input name="text" type="text" /><br /> Checkbox: <input name="checkbox" type="checkbox" /><br /> Radio: <input name="radio" type="radio" value="Lorem" checked /> Lorem <input name="radio" type="radio" value="Ipsum" /> Ipsum </form> <div id="response"></div> <button onclick="SendRequest()">Wyślij formularz</button>