Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validating Web input using a schema

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
OK, this is (hopefully) going to be my last question for a while, I need to make some serious code changes now.

Is there any way of extracting the rules defined in a schema, and using them in a xhtml page for validating user input?

(e.g. in my schema I have a string for validating an email address, can I get a schema fragment via script adn send my parameter to it to check it, or do I have to duplicate what is in the schema within script, thus creating 2 places that code needs to be modified from?

Thanks

K
 
XForms is the future of web forms, but unfortunately at the moment you need a (free) download to be able to use it with IE. You can get (one version of) this from:


XForms allows you to use XML as input and output to your form and validate it against a schema. It has all the functionality of regular HTML forms and much, much more. I'd recommend you look into it. A good starting point (as always) is:


The major downside is anyone wanting to view your page will have to download it as well.

If you don't want to go this far, your only option is to duplicate the schema in script form.

If you need any more help, just shout.

Jon
 
Thanks, but the requirements for this are low level, with a non it literate base, so it looks like js it is for now, thanks again

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top