Browsing articles in "JQuery"

Form Validation Like Ajax or JQuery Using Simple Javascript and CSS

Aug 5, 2009   //   by nuhil   //   Ajax, CSS, JQuery, JS  //  No Comments

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.

  1. <html>
  2. <head>
  3. <script type="text/javascript"><!–
  4. function update() {
  5. if(document.form.num_1.value != '1')
  6. document.form.sum.value = 'Start with 1';
  7. document.form.sum.style.visibility = 'visible';
  8. }
  9. //–></script>
  10. </head>
  11.  
  12. <body>
  13. <form name="form" method="post" action="">
  14. <table width="100%"  border="0" cellpadding="1">
  15. <tr>
  16. <td>First Number </td>
  17. <td><input name="num_1" type="text" id="num_1"  onChange="update()">
  18. <input name="sum" type="text" id="sum" readonly="" style="border:0px; visibility:hidden; "></td>
  19. <td>&nbsp;</td>
  20. <td>&nbsp;</td>
  21. </tr>
  22. <tr>
  23. <td>Second Number </td>
  24. <td colspan="3"><input name="num_2" type="text" id="num_2"  onChange="update()"></td>
  25. </tr>
  26. </table>
  27. </form>
  28. </body>

I hope logic can be developed by you for further uses.

Have you ever seen such a beautiful thing?!

Mar 16, 2008   //   by nuhil   //   HTML, JQuery, JS  //  2 Comments

Do you want to make your site look like Facebook? Then the fact is JQuery! jQuery is a lightweight JavaScript library that emphasizes interaction between JavaScript and HTML. It was released January 2006 at BarCamp NYC by John Resig.One of my best friends Rana told me to study this and i’ve got it.

See the example below:

You can use this kind of window for login or inserting data.

untitled1.jpg

Or you can show a remote Page through this. Read more >>