Welcome Guest, Not a member yet? Register   Sign In
[solved] don't understand javascript variable scope; now talking about validation plugin
#11

[eluser]SPeed_FANat1c[/eluser]
Quote:There’s another way to do this, which doesn’t involve AJAX. When the page load, you pass an json object with all validation rules for the form to the page. Then you implement a custom validation class in Javascript (modelled after the one you use on the serverside) and do all the checking in javascript itself. No server involvement, that is, of course, until you actually sent the data.

I don't understand this part - how we can validate something that needs to checked in database without using AJAX?

In general I already have done some validation with ajax and it worked, but this time I thought - why make my own functions if I can use something that is doen already - the plugin. And this plugin is actually cool thing, but it is interesting why the async is not made false by default there? Because othervise I don't see the point. Or is this a bug. I guess I need to ask this in jquery forums and see what they tell.

Damn it took quite a bit of time - I am trying to solve this since yesterday mornig Big Grin I would have done my own ajax validation much faster, did not think that it will take so long to solve such simple problem as it looks at the beginning.

Edit:
Quote:Be aware that you should always check the form on the server
I am doing this for admin side, so no need to validate in server, and in case javascrip is off, admin will not be able to submit at all.

Thank you guys for help.


Messages In This Thread
[solved] don't understand javascript variable scope; now talking about validation plugin - by El Forum - 01-26-2011, 07:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB