Form Validation Like Ajax or JQuery Using Simple Javascript and CSS
The code below will create a form with two fields. If do not enter “1″ in the first form field try to leave that field then it will response and create a message on the right side of the field.
This will work just like any Ajax or Jquery form validation but it is simply Javascript and CSS.
-
<html>
-
<head>
-
<script type="text/javascript"><!–
-
function update() {
-
if(document.form.num_1.value != '1')
-
document.form.sum.value = 'Start with 1';
-
document.form.sum.style.visibility = 'visible';
-
}
-
//–></script>
-
</head>
-
-
<body>
-
<form name="form" method="post" action="">
-
<table width="100%" border="0" cellpadding="1">
-
<tr>
-
<td>First Number </td>
-
<td><input name="num_1" type="text" id="num_1" onChange="update()">
-
<input name="sum" type="text" id="sum" readonly="" style="border:0px; visibility:hidden; "></td>
-
<td> </td>
-
<td> </td>
-
</tr>
-
<tr>
-
<td>Second Number </td>
-
<td colspan="3"><input name="num_2" type="text" id="num_2" onChange="update()"></td>
-
</tr>
-
</table>
-
</form>
-
</body>
I hope logic can be developed by you for further uses.
I've Launched my first Facebook Application using iFrame:
It is an interesting matter to have a facebook application built by own. There is enough restriction to use HTML code or using JS in that app. But adding this app in iframe mode you can place any kind of application you have made. You Application must be in your own hosting server. Facebook will just redirect to this location within there view.
To get started just go to the Developers link in your facebook account and you will get futher instruction.
My Application:
Name: Recent Event in RUET
To add this Application on your Facebook Profile :Get This: Click Here
Another Power of Ajax! Instant Edit on View-Page
When a page is displayed with requested data from a database, then normally the data it contains can be edited or updated by getting the id of that form and by using that to update the form. Now, with the Ajax you can make a output page where you can edit the field of the form by just clicking on it and it will be saved to database instantly.
I’m unable to describe the benifit or beauty of this task. Just try it and make it more effective and do the JavaScript and be with Ajax. Example named insedit.zip
Feelings of Drag and Drop using Ajax-PHP-MySQL
Refference -Building Responsive Web Application by PACKT PUBLICATION
You Just try this example and feel the power of Ajax and the libraries just like Script.aculo.us , prototype.js . Recently, Web Application without attractive interface is not accepted to real users. So, use the maximum of Libraries and Frameworks.
You can get this example in my Shared Box named dragdrop.zip







