http://www.php.net/manual/en/tutorial.forms.php
Should give u a good walkthrough on getting your input and beginning to use it.
Ben Reisner
2009-08-04 17:38:47
http://www.php.net/manual/en/tutorial.forms.php
Should give u a good walkthrough on getting your input and beginning to use it.
Hello,
You can use jQuery to get the element value, I presume it's a input of type="text", right? Ok, you can do then (jquery snippet):
the input:
<input type="text" id="txt">
the button
<input type="submit" id="btn">
the jquery for calling a page:
$(document).ready(function(){
//Add the calling to the click event of the button
$("#btn").click(function(){
$.ajax(
{
type: "POST",
url: "callingPage.php",
data: "param1=" + $("#txt").val(),
start: $("#result").html("Doing the magic..."),
success: function(res)
{
showResults(res);
}
});
return false;
});
}
);
You can see that $ajax call the page and pass parameters --the txt value to it by POST, with start option you can show some progress image or message and success defines a callback function to show the results.
Hope it helps.
Sebastian