Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Html form submission problem

Thread Tools
 
Search this Thread
 
Old 15 September 2003, 11:52 AM
  #1  
Iain Young
Scooby Regular
Thread Starter
 
Iain Young's Avatar
 
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes on 0 Posts
Unhappy

Hi folks.

I'm creating a web application for work which requires a large amount of data to be submitted via a form, (the content of the fields is generated depending on what the user has selected in various checkboxes on the page - could possibly be several hundred items). Basically, it's a comma delimited list of 16 digit numbers stored in a hidden text field.

The problem I have is that in Internet Explorer (6), as soon as I get above a certain number of selected items (i.e. when the hidden field gets above a certain length), the form will no longer submit using a submit button, and if I submit via javascript using document.form.submit() it displays and "Error: Invalid syntax" error on the submit line.

It all works fine with small amounts of data, and it works fine with large amounts of data in Netscape / Mozilla, so this seems to be a problem just with Internet Explorer.

Has anyone experienced a problem like this before, or do you know if there is a size limit form forms in Internet Explorer? I've tried trawling the net for a solution, but so far have not found anything

Thanks
Iain
Old 15 September 2003, 12:28 PM
  #2  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Post

Do you get a response from the server, and what code does it respond with?
Old 15 September 2003, 12:42 PM
  #3  
Gedi
Scooby Regular
 
Gedi's Avatar
 
Join Date: Jan 2003
Posts: 932
Likes: 0
Received 0 Likes on 0 Posts
Post

Is it even attempting to send data?
Set up a packet sniffer (like ethereal) and check outbound packets
Old 15 September 2003, 12:50 PM
  #4  
Iain Young
Scooby Regular
Thread Starter
 
Iain Young's Avatar
 
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes on 0 Posts
Post

No it's not getting as far as attempting to send anything to the server (it's being sent to a servlet, and I've got loads of monitoring stuff in there). It's behaving as though something is going wrong internally with Internet Explorer before the submission itself takes place...

Iain
Old 15 September 2003, 12:53 PM
  #5  
Gedi
Scooby Regular
 
Gedi's Avatar
 
Join Date: Jan 2003
Posts: 932
Likes: 0
Received 0 Likes on 0 Posts
Post

hmm, I don't know much about the internals of IE. I'm mainly a Linux hacker.

Do you not have the option to bin IE and switch to Opera or Mozilla? I use Opera on all my windows machines. I think you will find it noticably better than IE in all aspects.
Old 15 September 2003, 01:06 PM
  #6  
Iain Young
Scooby Regular
Thread Starter
 
Iain Young's Avatar
 
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes on 0 Posts
Post

It's a nice idea, but unfortunately the application I'm coding will be sold to our customers for deployment within their organisations (can't say any more because of the NDA). Between them they use Internet Explorer, Netscape, Mozilla and a handful who use Opera. In other words, I have to get it working on all of the popular browsers...

Iain
Old 15 September 2003, 01:17 PM
  #7  
TopBanana
Scooby Regular
 
TopBanana's Avatar
 
Join Date: Jan 2001
Posts: 9,781
Likes: 0
Received 0 Likes on 0 Posts
Post

Try it in another browser anyway - you may get a more sensible error message

Trending Topics

Old 15 September 2003, 01:21 PM
  #8  
Iain Young
Scooby Regular
Thread Starter
 
Iain Young's Avatar
 
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes on 0 Posts
Post

I've tried it in Netscape, Mozilla, Opera etc. Internet Explorer is the only one in which the error occurs...
Old 15 September 2003, 01:35 PM
  #9  
SJ_Skyline
Scooby Senior
 
SJ_Skyline's Avatar
 
Join Date: Apr 2002
Location: Limbo
Posts: 21,922
Likes: 0
Received 1 Like on 1 Post
Question

Can you split the form across 2 pages with smaller forms?
Old 15 September 2003, 01:47 PM
  #10  
AdrianFRST
Scooby Regular
 
AdrianFRST's Avatar
 
Join Date: Oct 2000
Posts: 368
Likes: 0
Received 0 Likes on 0 Posts
Post

Are you using GET or POST as the form method?

There is a size limit with GET, 256 chars I think.
Old 15 September 2003, 02:12 PM
  #11  
IWatkins
Scooby Regular
 
IWatkins's Avatar
 
Join Date: Mar 2000
Location: Gloucestershire, home of the lawnmower.
Posts: 4,531
Likes: 0
Received 0 Likes on 0 Posts
Post

Would suggest the same. GET is limited to the length of the URL that can be sent from the browser as the form content is encoded within the URL.

POST would work better as all the data is sent direct once contact is made bypassing any browser specific URL size limits.

Sounds like IE has a smaller URL size limit than Mozilla/Opera etc. and IIRC it is 4k.

Cheers

Ian

[Edited by IWatkins - 9/15/2003 2:13:16 PM]
Old 15 September 2003, 02:30 PM
  #12  
Iain Young
Scooby Regular
Thread Starter
 
Iain Young's Avatar
 
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes on 0 Posts
Cool

Aha, that solved the problem. I was doing a get rather than a post. Changing the method to post seems to have solved the problem.

Thanks for the help,
Iain
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
shorty87
Full Cars Breaking For Spares
19
22 December 2015 11:59 AM
B0DSKI
Non Car Related Items For sale
2
27 September 2015 06:58 PM
Phil3822
ScoobyNet General
3
26 September 2015 08:06 PM
psport
Subaru Parts
0
26 September 2015 11:09 AM
shorty87
Other Marques
0
25 September 2015 08:52 PM



Quick Reply: Html form submission problem



All times are GMT +1. The time now is 04:40 AM.