We help IT Professionals succeed at work.

javascript:void(0); is not working in IE 6.0 ???

1,939 Views
Last Modified: 2013-11-19
Hi,

I am writing code something like below:

<a href="javascript:void(0);" onClick="return submit_data();">
      Submit
</a>

So the same code is working in IE 7.0 and Firefox but its not working in IE 6.0, after clicking this link its doing nothing?? basically when user click this link then a javascript function "submit_data()" runs and checks for correct input if the input is correct then it will submit the form using javascript.

But in IE 6.0 its not submitting the page.
Please tell me how can i solve this..??

Thanks,
Comment
Watch Question

Top Expert 2007
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
Ah, my appologies. I never encountered that, even in IE6, reckon I'll have to go and change all my links now...
There is a hitch.... (isn't there always?)

The problem is intermittent, and seems to vary btw IE6 point releases, which is why you never saw it before. For instance, I never saw the problem on my laptop, but would see the problem on my desktop. They had different builds....

The safest bet is to always return false in click event handlers...

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.