onclick event - post and execute function?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 11oclocktuesday
    New Member
    • Nov 2006
    • 3

    onclick event - post and execute function?

    I have a page that I want to collect some simple data to send to a MySQL database, and execute a javascript function on the page. At the moment it works - but only with 2 buttons - one button's onclick event starts the function, and the other button 'posts' the data. Does anyone know what code will start a function and post data to the MySQL server in the one hit?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You can use an Ajax-like setup. Where on the click you first send the data via JS to the server, let it update the database and upon successful return continue with another JS function.

    Ronald

    Comment

    Working...