Javascript submit button vs html submit button

2004-09-15 Thread Mike Kear
How true is the following statement? :

[quote]

If you use a _javascript_ form submit button, you have to make sure your
form variables dont get too large because the _javascript_ function
passes the input to the action page using the GET method, and the
total length of a URL and all the URL Variables is limited.If you
have a very large amount of form input, you had better use HTML submit
buttons and the POST method

[/quote]

Is this true?Its brought about by an application I'm working on
where we might have a hidden form field with as many as 40,000 userIDs
passed to the action page in a comma delimited list.

Cheers
Mike Kear
Windsor, NSW, Australia
AFP Webworks
http://afpwebworks.com
.com,.net,.org domains from AUD$20/Year
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Javascript submit button vs html submit button

2004-09-15 Thread Steve Brownlee
I'm guessing this is true.If memory serves correct, the maximum length of a
URL is only 2,048 characters.If you need to transfer more data than that,
you have to use POST.



From: Mike Kear [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 15, 2004 8:08 AM
To: CF-Talk
Subject: _javascript_ submit button vs html submit button

How true is the following statement? :

[quote]

If you use a _javascript_ form submit button, you have to make sure your
form variables dont get too large because the _javascript_ function
passes the input to the action page using the GET method, and the
total length of a URL and all the URL Variables is limited.If you
have a very large amount of form input, you had better use HTML submit
buttons and the POST method

[/quote]

Is this true?Its brought about by an application I'm working on
where we might have a hidden form field with as many as 40,000 userIDs
passed to the action page in a comma delimited list.

Cheers
Mike Kear
Windsor, NSW, Australia
AFP Webworks
http://afpwebworks.com
.com,.net,.org domains from AUD$20/Year 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Javascript submit button vs html submit button

2004-09-15 Thread Andy J
Wow, one question, do you need to actually pass 40,000 user id's,
thats make you page site huge?

Also Js would submit the form using whatever method was declared in
the form tag.
Here's some test code

script language=_javascript_
function submitform()
{
document.myform.submit();
}
/script 

form name=myform action="" method=post
Search: input type='text' name='q'
A href="" submitform()Search/A
/form 

cfif isDefined(form.q)
form
cfelseif isDefined(url.q)
url
/cfif

Hope this helps

Andy

- Original Message -
From: Mike Kear [EMAIL PROTECTED]
Date: Wed, 15 Sep 2004 22:07:35 +1000
Subject: _javascript_ submit button vs html submit button
To: CF-Talk [EMAIL PROTECTED]

How true is the following statement? :

[quote]

If you use a _javascript_ form submit button, you have to make sure your
form variables dont get too large because the _javascript_ function
passes the input to the action page using the GET method, and the
total length of a URL and all the URL Variables is limited.If you
have a very large amount of form input, you had better use HTML submit
buttons and the POST method

[/quote]

Is this true?Its brought about by an application I'm working on
where we might have a hidden form field with as many as 40,000 userIDs
passed to the action page in a comma delimited list.

Cheers
Mike Kear
Windsor, NSW, Australia
AFP Webworks
http://afpwebworks.com
.com,.net,.org domains from AUD$20/Year
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Javascript submit button vs html submit button

2004-09-15 Thread Pascal Peters
It depends on what you mean by _javascript_ form submit button. But
doing form.submit() in JS simply submits the form using the method
specified in the form. If this is POST the values are passed in the HTTP
body and not in the URL.

Pascal

 -Original Message-
 From: Mike Kear [mailto:[EMAIL PROTECTED]
 Sent: 15 September 2004 14:08
 To: CF-Talk
 Subject: [Spam?] _javascript_ submit button vs html submit button
 
 How true is the following statement? :
 
 [quote]
 
 If you use a _javascript_ form submit button, you have to make sure your
 form variables dont get too large because the _javascript_ function
 passes the input to the action page using the GET method, and the
 total length of a URL and all the URL Variables is limited.If you
 have a very large amount of form input, you had better use HTML submit
 buttons and the POST method
 
 [/quote]
 
 
 Is this true?Its brought about by an application I'm working on
 where we might have a hidden form field with as many as 40,000 userIDs
 passed to the action page in a comma delimited list.
 
 
 Cheers
 Mike Kear
 Windsor, NSW, Australia
 AFP Webworks
 http://afpwebworks.com
 .com,.net,.org domains from AUD$20/Year
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Javascript submit button vs html submit button

2004-09-15 Thread Stephen Moretti (cfmaster)
Mike Kear wrote:

 How true is the following statement? :

 [quote]

 If you use a _javascript_ form submit button, you have to make sure your
 form variables dont get too large because the _javascript_ function
 passes the input to the action page using the GET method, and the
 total length of a URL and all the URL Variables is limited.If you
 have a very large amount of form input, you had better use HTML submit
 buttons and the POST method

 [/quote]

 Is this true? 

Its only half true.

Yes with GET type form submission you do need to ensure that the number 
of variables and their values does not exceed the maximum length for a 
URL (128 characters I think...don't quote me)

_javascript_ submission of pages need not be a GET submission.It can 
also be a POST method. This is determined by the FORM tag and not the 
way that it is submitted.

Its brought about by an application I'm working on
 where we might have a hidden form field with as many as 40,000 userIDs
 passed to the action page in a comma delimited list.

Ummm... eek!Would it not be better to provide a single reference to 
something the DB that allows you to pick out those IDs rather than 
passing them around on a page?

Stephen
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Javascript submit button vs html submit button

2004-09-15 Thread Micha Schopman
Internet Explorer is limited by 2048 bytes in urls, that is why GET
actions should be used with caution. If you send a form by _javascript_
keep in mind the onsubmit handler of a form will not be fired.

 
Micha Schopman 
Software Engineer 
Modern Media, Databankweg 12 M, 3821 ALAmersfoort 
Tel 033-4535377, Fax 033-4535388 
KvK Amersfoort 39081679, Rabo 39.48.05.380
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Javascript submit button vs html submit button

2004-09-15 Thread Mike Kear
Heheh  Andy I didnt believe it myself either.However it's sort of
historical to some extent.We have to live with some aspects of the
system we're working with.The user gets to select all or some of
the members in the membership database, and there are more than 40,000
members.So it's possible they could say yes all of those! and
click the Select all button.

Anyway, thats how the guy with the money says it's going to work, and
there's no money to pay to change the way it works, so we're living
with that.I agree with you, Andy i'd rather see those 40,000 refIDs
going into even a temporary table or something, just in case there's a
hiccup at the moment of submitting the form.

Thanks for your thoughts. I'm going to have a try with a set of 40,000
ID numbers and see what happens.

Cheers
Mike Kear
Windsor, NSW, Australia
AFP Webworks
http://afpwebworks.com
.com,.net,.org domains from AUD$20/Year

- Original Message -
From: Andy J [EMAIL PROTECTED]
Date: Wed, 15 Sep 2004 13:27:35 +0100
Subject: Re: _javascript_ submit button vs html submit button
To: CF-Talk [EMAIL PROTECTED]

Wow, one question, do you need to actually pass 40,000 user id's,
thats make you page site huge?

[snip]
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]