PDA

View Full Version : Resolved onclick event works only one time



smansakra
04-29-2009, 02:30 AM
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.

magicyte
04-29-2009, 02:45 AM
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.

Nile
04-29-2009, 02:46 AM
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)

magicyte
04-29-2009, 02:50 AM
Weird... http://localhostr.com/files/72475a/capture.png

Whaddaya know! I tried it out in google chrome and it worked. Probably my proxy addon for ff...
Ah, yes. The links do seem to work out. All of them work in FF 3.0.10... What browser are you using, smansakra?

smansakra
04-29-2009, 03:04 AM
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

smansakra
04-29-2009, 06:58 AM
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