| Author |
Invalid syntax error in IE6
|
KC Smith
Greenhorn
Joined: Nov 16, 2004
Posts: 7
|
|
I'm encountering an error in IE6 that seems to be related to setting autocomplete="off" on a form or its elements. The js code is very simple and works - autocomplete is suppressed. But the page fails on submit. <!-- // script to disable form autocomplete for(var i=0; i<document.forms.length; i++){ document.forms[i].autocomplete="off"; } //--> The application is struts and pages between input forms. From one form if you go forward or backward the browser displays 'invalid syntax error' in the title bar, and a 'page cannot be displayed' error. No errors are thrown on the J2EE server - this seems entirely a browser problem. The functionality works as intended if the autocomplete attribute is not set on the form. Anyone encountered this before? Thanks- K
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56192
|
|
|
Moving to the HTML/Javascript forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
Why are you setting that dynamiclaly instead of just adding it to the forms? If JavaScript is disabled then it will not be applied... Eric
|
 |
KC Smith
Greenhorn
Joined: Nov 16, 2004
Posts: 7
|
|
|
The form and fields are created using Struts - i.e. <html:text property="person.firstName"/> - and autocomplete is not an option on those tags. My first choice would be to explicitly set the attribute, but that is not possible.
|
 |
 |
|
|
subject: Invalid syntax error in IE6
|
|
|