473,241 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

IE form.submit() proudces invalid syntax error

Hi all.

I'm trying to diagnose/solve a problem with internet explorer, whereby
sometimes the form submits, and other times IE produces an 'invalid
syntax' error.

First, I have a form, and within the form is a button bar and a <div>
block which contains a table of parameters. The div block is used to
create a layer.

Now, when the table contains 15 or less rows in it, any button on the
button
bar which calls form.submit() works as it should, however, where the
table has 16 or more rows, the form.submit generates an "invalid
syntax" error. IE doesnt provide any more detail on this error.

Mozilla/Netscape works as expected regardless of the number of rows.

I am using IE 6.0.2600.0000 but have also tried on other versions of
IE 6
and get the same results.

The code is as follows:
function _runButton()
{
document.getElementById('count_groups_form').submi t();
}

<!-- Extra HTML removed -->

<form action="UpdateCount" method="get" id="count_groups_form"
enctype="application/x-www-form-urlencoded">
<input type="hidden" name="edit" value="0">
<input type="hidden" name="new_order" value="0">
<input type="hidden" name="action" value="">
<input type="hidden" name="has_changed" value="0">

<!-- Button Bar -->
<table class="button_bar" width="100%">
<tr>

<!-- other buttons removed -->

<td align="right" width="23%">
<input type="button" class="button" name="_run_button"
value="Run Count" onClick="_runButton();">
</td>
</tr>
</table>

<div align="left" class="count_groups" id="count_groups">
<table width="100%" class="without_border">

<!-- actual rows removed -->

</table>
</div>
</form>

Any help will be much appreciated.

Please reply to ki****@alchemetrics.co.uk
Jul 23 '05 #1
4 10679
Bradley Kite wrote:
Hi all.

I'm trying to diagnose/solve a problem with internet explorer, whereby
sometimes the form submits, and other times IE produces an 'invalid
syntax' error.
<--snip-->
I am using IE 6.0.2600.0000 but have also tried on other versions of
IE 6
and get the same results.

The code is as follows:
function _runButton()
{
document.getElementById('count_groups_form').submi t();
document.forms['count_groups_form'].submit()

}

<!-- Extra HTML removed -->

<form action="UpdateCount" method="get" id="count_groups_form"
enctype="application/x-www-form-urlencoded">
<form NAME="count_groups_form".........>
Use the Forms NAME attribute along with the forms collection, test it,
and report back....

<--snip-->

Please reply to ki****@alchemetrics.co.uk


No thanks. Ask in Usenet, get answered in Usenet. Read the group FAQ
with regards to such.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
Tried that, and still no luck I'm afraid.

Its really strange that it works if there are 15 or less rows in the
table
(and therefore 15 or less <select> boxes), but 16 rows/<select> boxes
and
it doesnt?!?.

Could this be a bug in Internet Explorer??

Has any body else experienced similar problems?

I might try creating a new <form> (with hidden values) and have some
javascript copy all the values into it from the one that wont submit.
I'll let you know how I get on.

Regards
--
Brad

Jul 23 '05 #3
Brad wrote:
Tried that, and still no luck I'm afraid.

Its really strange that it works if there are 15 or less rows in the
table
(and therefore 15 or less <select> boxes), but 16 rows/<select> boxes
and
it doesnt?!?.

Could this be a bug in Internet Explorer??

Has any body else experienced similar problems?

I might try creating a new <form> (with hidden values) and have some
javascript copy all the values into it from the one that wont submit.
I'll let you know how I get on.


Read the FAQ with regards to not quoting what you are replying to. This
is Usenet, not Email.

Post a URL to two pages. One with 15 "rows" and one with 16 "rows" so
that actual code can be tested.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #4
I realize this is a bit late, but the answer has to do with the length
of the request your form generates. Since MSIE only allows a limited
number of characters in a "GET" request, for long requests (i.e. many
fields), use a "POST" instead.

Bradley Kite wrote:
Hi all.

I'm trying to diagnose/solve a problem with internet explorer, whereby sometimes the form submits, and other times IE produces an 'invalid
syntax' error.


<snip>

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dave | last post by:
Hi, I know i shouldn't work on php forms when i'm going on 30 hours of no sleep, but i did anyway. I'm trying to get the below to work, and i keep getting a parse error line 74, an unexpected ','...
1
by: Cooper | last post by:
Hello, i have a form with TEXT, SELECT etc, elements. Simple, i suppose two TEXT (name: T1 and T2). If a user insert a bad value, it display a error message and turn back at form. My problem is:...
10
by: Steve Benson | last post by:
Our regular programmer moved on. I'm almost clueless in Javascript/ASP and got the job of adapting existing code. In the page below, everything works until I added the function checkIt() to...
18
by: lawrence | last post by:
If I'm pretty sure there is just one form on the page, can i do this? var myForm = document.forms; If I'm not sure about the form, is it safer to do this? if (document.forms) { var myForm =...
4
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form...
3
by: PJ6 | last post by:
When I have client-side script like this - document.forms.submit('test') how do I access, from server-side code, the value I put in the submit method? Also, is it possible to get the...
5
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input...
7
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
1
by: gbezas | last post by:
Hi All, I have added an event handler to redirect form.submit() to a newSubmit() method that I have defined (which does some additional processing before submitting the form). Additionally I...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.