Page 1 of 1

Tips for using ajax with forms request

Posted: Sat Feb 27, 2010 6:23 pm
by wiseoleweazel
Hi there everyone.

I have not been a member of the forum long but this is the first programming forum in which i feel quite welcome and comfortable. It would be nice to help others in future too.

Okies right now i am toying with the ajax way of doing things but am having a little trouble grasping how to implement it, what functions are really capable of here and if certain things are possible.

For instance i could do with a pointer on how i can check for changes in the input on a per character basis, change field background colours or font colours on errors in input etc. I do not want a ready made solution just need to be put in the right mindset i guess.

Thankyou for your time guys.

Re: Tips for using ajax with forms request

Posted: Sat Feb 27, 2010 10:43 pm
by s.dot
Look at javascript event handlers to trigger events.
For instance i could do with a pointer on how i can check for changes in the input on a per character basis,
Something like:

Code: Select all

<input type="text" onkeyup="checkChanges();">
You will need to write your own javascript functions, but event handlers will trigger the functions.
Event handler list: http://www.elated.com/articles/events-a ... -handlers/

Re: Tips for using ajax with forms request

Posted: Sun Feb 28, 2010 1:43 pm
by wiseoleweazel
Thanks for your help s.dot, i will likely have a few more questions about possibilities with this if you don't mind. Will post later once i have read up on javascript event triggers.