Web Analytics Made Easy -
StatCounter question concerning searching from a field input in the middle of a form. - CodingForum

Announcement

Collapse
No announcement yet.

question concerning searching from a field input in the middle of a form.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • question concerning searching from a field input in the middle of a form.

    Ok, I know that didn't explain the situation completely - here is what I'm doing - I hope you guys can help me out here.

    Been playing with PHP and MySql for a long long time but this one has me stumped.

    I'm using a form with several fields. One field is a serial number. What I would like to do is immediately after the field is entered (focus shifted to the next field) do a search for that serial number in the database and display the results if any in a separate window during the form execution. Possibly have it modify the rest of the form inputs if that serial already exists in the database or something like that. I hope I explained it properly. No need to check each character of the entry into serial number - just check it after it has been entered. Any ideas?

    Thanks in advance.

    Steve

  • #2
    Ajax is a good candidate for this type of action, because you can bounce over to the server, do the query and bounce back again with the data without the user seeing much of a delay.

    If you'd rather stay out of the Ajax realm, you can use Javascript to to detect the "onblur" event of the serial number field and submit the form when that happens. Set up your PHP script to then detect when the serial number needs to be queried, do the query and send the data back to the form.

    If you need more detailed guidance just holler... I was probably not as clear as I hoped to be.

    Comment

    Working...
    X