Results 1 to 3 of 3

Thread: Using AJAX, can I save form info to db on event onLostFocus?

  1. #1

    Thread Starter
    Fanatic Member jcavard's Avatar
    Join Date
    Jul 2005
    Location
    Quebec, CANADA
    Posts
    534

    Using AJAX, can I save form info to db on event onLostFocus?

    Hi!

    I am designing a PHP/MySQL app to edit Plant information. My boss would like the app to automatically save as the user exits the textbox or change anything in the form (no need for a submit then) is this something possible with ajax??
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    accoustic emo-rock band: a tailormade fable

    Visual Studio 2003 / Framework 1.1

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Using AJAX, can I save form info to db on event onLostFocus?

    It is possible, but don't get rid of the submit buttton. Not all users will have Javascript enabled. Also, a form without a submit button will be a bit disconcerting for the users.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Fanatic Member jcavard's Avatar
    Join Date
    Jul 2005
    Location
    Quebec, CANADA
    Posts
    534

    Re: Using AJAX, can I save form info to db on event onLostFocus?

    indeed, that's a fact, really disconcerting.
    as for the disabled javascript, this means AJAX wouldn't be working at all in that case? is there any way to force it? or anything?

    BTW, I found NAJAX class on PHPClasses.org that allows to call PHP function on javascript event, exactly what I meant.. thank you!
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    accoustic emo-rock band: a tailormade fable

    Visual Studio 2003 / Framework 1.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width