Jazz914
05-10-2010, 11:19 AM
I'm currently trying to get used to JQuery, but personally I prefer Prototypejs and scriptalicious.
Basically my question is, I see loads of tutorials on submitting forms via ajax to a designated and absolute file path such as "/process.php", but i've never seen the concept of ajax forms being submitted with the php file itself, I can see why not but i'm wondering if its possible. An example would be:
<form action="" method="post" id="blah">
Fields here
</form>
<?php
/*Have the ajax submission process this code instead of an external file*/
?>
I ask this, because it would seem like a good thing to know as it would make life easier, I understand the problems which can come from this such as if you're using a templating system it would just load the whole page into the specified response location.
But my question is, is it possible WITHOUT loading the whole webpage into the div..
I pretty much know the answer but I'm not fluent in javascript so it would be nice if this theory would be confirmed from some of you javascript guru's out there ^_^
----
PS: If this IS possible, in one framework but not the other, I don't mind just let me know which :)
Basically my question is, I see loads of tutorials on submitting forms via ajax to a designated and absolute file path such as "/process.php", but i've never seen the concept of ajax forms being submitted with the php file itself, I can see why not but i'm wondering if its possible. An example would be:
<form action="" method="post" id="blah">
Fields here
</form>
<?php
/*Have the ajax submission process this code instead of an external file*/
?>
I ask this, because it would seem like a good thing to know as it would make life easier, I understand the problems which can come from this such as if you're using a templating system it would just load the whole page into the specified response location.
But my question is, is it possible WITHOUT loading the whole webpage into the div..
I pretty much know the answer but I'm not fluent in javascript so it would be nice if this theory would be confirmed from some of you javascript guru's out there ^_^
----
PS: If this IS possible, in one framework but not the other, I don't mind just let me know which :)