The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery form plugin> onclick handler problem

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #35160

    when use the below code inside the

    to open the registration page, it don’t work.

    when i put the the javascript separately, it works but by clicking anywhere on the page. i want the onclick event to fire when only clicked on the “register” button. im new to javacript.


    The reason your top code doesn’t work is that on the “onclick” event you define a function. You don’t actually call that function, you just define it. Remove the function definition. Try something like this:


    You’re also using double quotes within a double quote delimited string. You should switch to single quotes like I’ve done above.

    Also, if you have not already, check out jQuery. It makes event handling extremely simple and fool-proof, plus there is a lot of support for jQuery on these forums.

    Seems like I’ve answered this same question for you before :)


    yeah, you did and i used this jQuery form plugin
    but onclick handler don’t work when i use this plugin. other wish onclick handler works just fine.


    onclick handler also don’t work when buttons has css color customization applied. i ran into that problem when i was using modal windows last time.


    for now, i’m not using that jQuery form plugin^^… any suggestions on how to make it work?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.