473,400 Members | 2,163 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,400 software developers and data experts.

Submitting a form

I've inherited an ASP application that currently builds up a URL with a
series of keys and values (http://url?key=value&key=value&key=value).

Having built this up programmatically, it then does a Response.Redirect
command.

The problem I have is that I need to add a new key and value to this, but
the existing URL is so long that it almost breaks the limit for the length
of a URL. So, as soon as I add on my new key-value it breaks.

I wondered about shortening the names, but on inspection it appears that my
predecessor has already gone down that path.

What I therefore want to do is to create a form with hidden text fields and
make the form POST the data.

Within the ASP code, it's fairly trivial to build up this form in the same
way that the URL was built up.

However, I now need to SUBMIT this form from my ASP page (running on IIS).

What would be the equivalent of the Response.Redirect command that will now
submit my form?

Or...is there an even better way to go about this....?

Griff
Jul 22 '05 #1
3 1252
Griff wrote:
I've inherited an ASP application that currently builds up a URL with
a series of keys and values
(http://url?key=value&key=value&key=value).

Having built this up programmatically, it then does a
Response.Redirect command.

The problem I have is that I need to add a new key and value to this,
but the existing URL is so long that it almost breaks the limit for
the length of a URL. So, as soon as I add on my new key-value it
breaks.

I wondered about shortening the names, but on inspection it appears
that my predecessor has already gone down that path.

What I therefore want to do is to create a form with hidden text
fields and make the form POST the data.

Within the ASP code, it's fairly trivial to build up this form in the
same way that the URL was built up.

However, I now need to SUBMIT this form from my ASP page (running on
IIS).

What would be the equivalent of the Response.Redirect command that
will now submit my form?

Or...is there an even better way to go about this....?

Griff

A couple options (there are more):

1. Use client-side code to submit the form in the onload event - follow up
in a client-side scripting newsgroup such as .scripting.jscript for
assistance with this approach
2. Use ServerXMLHTTP to submit your data to the other page and retrieve the
results. - http://www.aspfaq.com/show.asp?id=2173

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #2
Bob

The JavaScript option seems most suitable in this instance as it doesn't
come back.

So, I'll use the onLoad() event in the body to call some javascript to
submit the form.

Thanks!

Griff
Jul 22 '05 #3
Gazing into my crystal ball I observed "Griff" <Ho*****@The.Moon> writing
in news:uY**************@tk2msftngp13.phx.gbl:
Bob

The JavaScript option seems most suitable in this instance as it doesn't
come back.

So, I'll use the onLoad() event in the body to call some javascript to
submit the form.

Thanks!

Griff


Be aware that you are going to have to provide a non-javascript alternative
for users who do not have javascript enabled.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #4

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

Similar topics

1
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your...
2
by: Greg T | last post by:
Hi, I have a rather long form that I don't want people submitting unless they are absolutely sure they are ready. I figured the easiest way to prevent an accidental form submission by way of...
5
by: Don | last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is there some way, using JavaScript, to setup a <form> tag to do this? Thanks, Don ----==...
1
by: Richard Dixson | last post by:
I have code that calls document.myFormName.submit() to submit a form automatically via JavaScript. This works just fine. However, if there is a button (or other form field element) on the form...
1
by: Hello | last post by:
Scenario: A page creates a pop up and that pop up submits a form. Is there a way to detect whether the submitting was successful or not, so true/false could be passed to the parent window?
4
by: Super Steve | last post by:
I'm trying to write a little script that disables the submit button on a form, changes the text of the button, and then submits the form. Can anyone tell me why this works ok: <input...
3
by: kgbalaji1980 | last post by:
Hi all, i want the jscript coding for more than one form in one page and submitting the same . ie one parent form and one append button when we click that button one child form will display...
18
by: NavinM | last post by:
I have a couple of forms that are misbehaving in FireFox, but work fine in IE. when i do submit( with submit button) a javascript function validates all of the fields entered, and stops the...
1
by: dittu | last post by:
How to close the popup window when submitting the form? I have a sample.jsp. In that page one button is there. when button pressed, open popup window contains one "text box" and one " submit...
6
by: phpnewbie26 | last post by:
This has been confusing me for a while. I don't understand why it isn't working. In my original coding, I have an action called submitted.php and this is what is looks like: <?php ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.