tensh |
|
---|---|
It will be easy for you:
I noticed that in ajax parts of plugins I cannot use the template tags assigning. Also, I don't fully understand the ajax parts tutorial on Seditio page, so I used mootools forms instead because it's damn easy to understand. One question: I want to validate the "x" variable that is passing in each POST form: how can I do this in the ajax part php file (I don't want to touch js)? Thanks in advance ![]() |
ez |
|
---|---|
If you post a form, then validation of the fields can be done by php.
I don't see the connection with Ajax just yet.. ? Usually ajax is used to load 'dynamic' info to the webpages. And no TAGS are used here... just plain HTML. Wich plugins do you refer to ? And is the POSTing done by AJAX ? ==- I say: Keep it EZ -==
|
tensh |
|
---|---|
Yes, posting data to form results in div refresh. I asked exactly about php way to validate the form using the "x" parameter.
|
|
Відредаговано: tensh (03.11.2009 22:05, 15 років тому) |
Trustmaster |
|
---|---|
markitup plugin is a good example of AJAX part. markItUp! editor sends data to the AJAX script using POST method and passes the "x" parameter which is equal to $sys['xk']/{PHP.sys.xk}. On the PHP side (ajax part of the plugin) there is nothing special, because Cotonti checks that "x" variable on all POST requests automatically. Manual checks are needed for GET only.
May the Source be with you!
|