View Full Version : strange invalid syntax error in IE6

08-26-2004, 07:02 PM
I have an HTML form with many elements (about 30). Each element is either text or a select drop down list, and each is preceded by a checkbox. There is a button, in the form, with the onclick event linked to a javascript function that checks whether at least one box is checked. If so, the form is submitted, otherwise throws up an alert dialog.

The issue here is that the form works without issue in Firefox/Mozilla (the javascript console in Mozilla shows no javascript errors) and Opera. However, in IE, it throws an "Invalid Syntax" javascript error, and the line it refers to contains only the closing brace for an if block.

I've narrowed the problem down to the number of elements in the form. Beyond a certain number (I believe 20), the error pops up in IE, but anything less there is no issue. I'm absolutely certain of this since I cut and pasted in the elements in one by one into the form, and in random order several times to make sure it wasn't just one specific element causing the problem.

Does anyone know if this is a known bug in IE? I know the simple solution is to just not use IE, but unfortunately, the people who are using this use IE exclusively. Any help appreciated. Thanks. Attached is the html. The javascript and stylesheet follow.


Willy Duitt
08-26-2004, 07:26 PM
Oh... I started looking at your codes here (http://www.webdeveloper.com/forum/showthread.php?s=&threadid=42791) and just now had the time to take your numerous files, remove the Google Adsense crap and put them together so I could run them... But I see you got tired of waiting... Sorry but I was trying to help as I could find time between the other things I need to be doing, such as running my business...

Good Luck....

08-26-2004, 07:32 PM
heh, funny. Didn't realize you were also involved in this forum also well. I was just looking for other people to look at it since I'm fairly certain this is not going to be an easy bug to track down (if it is a bug on my part). I appreciate the help in any case. I spent two days trying to figure out what was going on :).

09-14-2004, 10:49 AM
Hi, I found a solution which worked for me.
In the form tag use method="post" instead og "get". The get method is restricted to 255 characters or so.