Tips for using ajax with forms request

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wiseoleweazel
Forum Newbie
Posts: 5
Joined: Thu Feb 11, 2010 6:25 pm

Tips for using ajax with forms request

Post 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.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Tips for using ajax with forms request

Post 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/
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
wiseoleweazel
Forum Newbie
Posts: 5
Joined: Thu Feb 11, 2010 6:25 pm

Re: Tips for using ajax with forms request

Post 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.
Post Reply