Author

Topic: Javascript problem in Firefox. (Read 1254 times)

sr. member
Activity: 260
Merit: 250
June 21, 2013, 10:06:56 AM
#6
If "return false;" is not preventing the page reload then an error is occurring in the javascript that executes before it reaches the return statement.
sr. member
Activity: 378
Merit: 255
June 21, 2013, 12:18:43 AM
#4
What about it doesn't work? Not to be snarky but why are you asking here and not stackoverflow?

Maybe try putting a # in your href.

Code:

hero member
Activity: 686
Merit: 504
always the student, never the master.
June 20, 2013, 11:52:42 PM
#3
should be
    return false;
not
    return: false;


That should prevent the page reload.  If not, try using setTimeout to call reloadCaptcha in the onclick attribute.


ok, thanks for the response. i will try your suggestions.

edit: i tried both methods, even with placing the reloadCaptcha inside the setTimeout but its still giving the same result but with it seems to be decreasing page load speeds

sr. member
Activity: 260
Merit: 250
June 20, 2013, 11:07:56 AM
#2
should be
    return false;
not
    return: false;


That should prevent the page reload.  If not, try using setTimeout to call reloadCaptcha in the onclick attribute.
hero member
Activity: 686
Merit: 504
always the student, never the master.
June 20, 2013, 07:55:21 AM
#1
Ok, i'm having problem getting this to work in firefox

this is a captcha i made using a devshed tutorial. this function is used to reload.
Code:



i'm using the following to call the function in an href

Code:

this works perfect in chrome and in ie as well.

however i can't get it to work in firefox.

as a work around, i'm using
Code:
return: false;"
which works in firefox, but it refreshes the entire page in all 3 browsers and looks unproffesional in my opinion.

Code:

i need to find a work around for this in 5 days or less. The site is ready for production and the owner has signed off on it, but i think i could do this a little better. i don't know much about ajax or jquery. i need a crash course or atleast a work around for this problem.

r3wt



Jump to: