I have the following code that takes the field "text1" and passes it to a php page that processes it. Despite the fact that I am aware of what to do on the php page for multiple text fields, I can't figure out this part below because I'm not that great at ajax...
So my question is, how do I convert the following code to make it work for 3 text fields instead of just one? (example, "text1, text2, text3")
Here is the code...
<script>
$(document).ready(function () {
$('#submit').click(function(){
var ths = this;
var str = $(ths).siblings("#text1").val();
$.post("saveData.php", {t:str}, function(value){
$(ths).parent("#c").fadeOut("fast");
$(ths).parent("#c").siblings("#cn").html(value);
});
});
});
</script>