Results 1 to 6 of 6

Thread: onclick event works only one time

  1. #1
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default onclick event works only one time

    hello...
    i don't understand why it happened?
    please see my site here http://smansakra.net.tc/browse.php
    there you will find 3 links (All Members, Online, Search )
    all of that link contain " onclick="wrapper_getpage(6,'search.php','search');return false;" "

    right after all of document finished loaded, if we click one of them it will work properly, but if we click the other it doesn't work.

    hum, it strange, my onclick event just works one time.
    Last edited by Snookerman; 04-29-2009 at 07:16 AM. Reason: added “Resolved” prefix
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

  2. #2
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    It seems that I'm unable to visit the link... Perhaps you typed it incorrectly? Post your code just in case something's wrong with my browser, please.

    Perhaps I'll try to guess without viewing the page. I don't think you need that 'return false;' unless you are submitting a form without a button.

  3. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Nope it's right:
    http://smansakra.net.tc/browse.php

    As for your tragedy, it all works but when I click Search it doesn't become selected, is that you're tragedy? (If it is, I'm sure we can fix it)
    Jeremy | jfein.net

  4. #4
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    Weird... http://localhostr.com/files/72475a/capture.png

    Edit: Whaddaya know! I tried it out in google chrome and it worked. Probably my proxy addon for ff...

    Edit: Ah, yes. The links do seem to work out. All of them work in FF 3.0.10... What browser are you using, smansakra?
    Last edited by magicyte; 04-29-2009 at 02:55 AM.

  5. #5
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default hum

    MAGICSTYLE: Perhaps I'll try to guess without viewing the page. I don't think you need that 'return false;' unless you are submitting a form without a button.
    my code is like this <a href="link.php" onclick="function1();return false;">search</a>
    by doing return false, my javascript function will work and make the link disable. but it will still work if the user right click the link and open link in new window or tab.

    NILE: As for your tragedy, it all works but when I click Search it doesn't become selected, is that you're tragedy? (If it is, I'm sure we can fix it)
    no, all of it work. open your browser in 2 window. each of them type my site. then click "search" on both browser first and second browser, it work isn't it. after it work, let's click "search " again, ups.... it doesn't work, my "return false" doens't success make my link disable.


    i use firefox 2

    thanks
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

  6. #6
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default i have done

    hi, i have done! all are fine now....!
    http://smansakra.net.tc/browse.php

    thanks for all of your reply


    huh, 4 hours trying and error
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

Bookmarks

Posting Permissions

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