PDA

View Full Version : Creating a Form object using Javascript


diwakar
04-15-2006, 02:31 AM
:( Hi,
Is it possible to create form object like this
var form = new Form() using javascript?
If this is possible can some one please let me know the different mehtods that can be called on it. I want to validate a user using his user id and password. So i want to do a backgroungd check for his authen tication without refreshing the page. If the usr is autheticated the i would rediect him to another pager. On failure i wold redirect him to an error page.l

Kravvitz
04-15-2006, 05:22 AM
You would need to use the DOM's document.createElement() method.

If you want to do something like that without refreshing the page, you need to use AJAX (http://www.google.com/search?q=AJAX+%7Etutorial) or JSRS (http://www.ashleyit.com/rs/).

JavaScript tutorial - W3C DOM introduction (http://www.howtocreate.co.uk/tutorials/javascript/domintroduction)
http://www.quirksmode.org/dom/
http://www.quirksmode.org/js/dom.html
http://www.brainjar.com/
http://developer.apple.com/internet/webcontent/dom2i.html
http://www.mozilla.org/docs/dom/domref/dom_doc_ref.html
http://www.mozilla.org/docs/dom/domref/
http://www.w3schools.com/htmldom/dom_obj_document.asp
http://www.sitepoint.com/article/rough-guide-dom
http://developer.mozilla.org/en/docs/Gecko_DOM_Reference
http://digital-web.com/articles/forms_usability_and_the_w3c_dom/
http://www.w3.org/DOM/