Now you all might now i made my own JSFramework. Well i thought i would write a tutorial on how you can use some of the features. Plus it gets it known out there in the big world so
Sending Forms with Jooney
It is very easy to process forms with Jooney. It is designed to make it easier for the user to be able to process forms using Ajax. Jooney will automatically set up all the fields in the form and send them as GET.
First off though i guess it would be a good idea to download Jooney
http://www.jooney.co.uk/download/
And of course place the following code at the top of your page
PHP Code:
<script type="text/javascript" src="javascript/jooney.js"></script>
We can now started using Jooney.
PHP Code:
<form id="form1" name="form1" method="post" action="">
<input type="text" name="textfield" id="textfield" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
As of yet Jooney form cant deal with tables when used with forms. So if you put a form in a table then it cant read all the fields and wont pass them all.
We have our form set up anyway. Now we can easily send this form by changing the input field to a button and placing a onClick.
PHP Code:
<form id="form1" name="form1" method="post" action="">
<input type="text" name="textfield" id="textfield" />
<input type="button" name="button" id="button" value="Submit" onClick="$.Ajax.form('form1','process.php','divID');"/>
</form>
We have used the following line of code
PHP Code:
$.Ajax.form('form1','process.php','divID');
We have set 3 things
1. The form ID
2. The page where you will deal with the results
3. The DivID that will show the results when the request was run.