<form name="theForm" id="theForm" action="" onsubmit="return false;">
Main Topics
Browse All TopicsI have an ajax autocomplete that works fine on Firefox, Safari, IE7 but turns me crazy on IE6 and that's the browser the client use!
The problem is that I use a form header
<form name="theForm" id="theForm" action="javascript:void(0)
When clicking on the submit button IE6 does nothing ie not the redirection.
I have tried "javascript:;"
"javascript: return halse;" gives an error in FF
Please help.
P. Marione
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I'm not entirely sure what it is you want to accomplish. You mentioned that IE6 does nothing when action="javascript: void(0)". That's to be expected. You also mentioned something about IE6 not redirecting, but I'm confused as to what you want it to redirect to (you explicitly told it to not do anything). Can you elaborate on what exactly you want?
Here it is http://www.schaerbeek-prop
In fact I have 2 scripts: one script validates the fields if on submit if it's OK it redirects or it diplays error msgs. Works fine on any browser.
The 2nd script is an ajax script that autocompletes a field via an external php file. Works fine on any browser.
Problem comes when I use the 2 scripts together: in IE6 the call for redirection is done (I can see it in debugbar) but the page is not displayed.
You can check at the url
Thank you
In submitForm(), return false instead of just returning. A form's default behavior is to perform the action specified in the action property. You have to explicitly tell the form not to behave normally by returning false.
You can also remove javascript:location.reload
You should also change the onSubmit method of the Validation reference type to return false if validation fails.
I get an error in IE5: _submitButton is null or not an object in line 540. It looks like the error is caused by initiating the auto complete in the load event. The code is part one below. No element exists with an id of bouton_submit. So part one should be changed to part two.
You also don't need to call submit() in the button's click event. That'll happen naturally when the user clicks the submit button.
Validation.prototype.onSub
Alrighty. I saved the HTML and associated files to play with locally. Change the form start tag to the code below.
The javascript: void(0) is part of the problem, and it seems Prototype is another part of the problem.
I kept all the changes made in the previous posts the same; changing the form tag made it work in IE6, IE7, Firefox, Safari, Opera, and Chrome.
For what it's worth, action="javascript: void(0)" isn't the recommended solution to keep form from submitting; onsubmit="return false;" is.
I now have a problem with the autocomplete.
Thank you very much for your help but I have decided to stop bothering you and use another "autocomplete" script.
Seems to work, just have to fight with the css but that's not real problem.
If you come in Brussels, let me know, I'll buy you a coffee or a beer.
@+ P Marione
Business Accounts
Answer for Membership
by: ritetekPosted on 2009-03-05 at 08:19:12ID: 23807077
have you tried using "#" as the action?