473,322 Members | 1,714 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,322 software developers and data experts.

Form Submit Dynamic URL, Leave Fields Off

Hi, I need to send a URL from a form like:

http://thehost/12345?A=B

where the number comes from a form text field. I can't send

http://thehost/12345?A=B&formnum=12345

where formnum is the field name, because I can't change the
server-side application, and the application rejects the request if
the formnum parameter is present.

I am using JavaScript to build document.formname.action from the form,
but the browsers (both IE 6 & Netscape 8) are appending the form
fields too. I can't leave the name= part off of the form fields, can
I, and still be able to access the fields?

--
Mitchell Fisher, Unisys Corp.
remove spamnot before replying
May 27 '07 #1
1 5179
Mitchell Fisher said the following on 5/27/2007 5:24 PM:
Hi, I need to send a URL from a form like:

http://thehost/12345?A=B

where the number comes from a form text field. I can't send

http://thehost/12345?A=B&formnum=12345

where formnum is the field name, because I can't change the
server-side application, and the application rejects the request if
the formnum parameter is present.
Then don't submit the form, just change the location.href of the
document to point to the new URL.
I am using JavaScript to build document.formname.action from the form,
but the browsers (both IE 6 & Netscape 8) are appending the form
fields too. I can't leave the name= part off of the form fields, can
I, and still be able to access the fields?
var theURL = "http://thehost/12345?";
var theEndOfTheURL = "something generated";

document.location.href = theURL + theEndOfTheURL;

And don't submit the form.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 27 '07 #2

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

Similar topics

2
by: Nick | last post by:
Loop to create an array from a dynamic form. I'm having trouble with an application, and I'll try to explain it as clearly as possible: 1. I have a form with two fields, say Apples and...
1
by: Don Stefani | last post by:
Hello, I have a form that I want to submit "onchange", OK I've got that working, but when the form submits, I want to pass along a value to a CGI script, as if that value was in a hidden form...
7
by: pizzy | last post by:
PROBLEM: I CAN'T GET THE LAST RESUTS TO WORK CORRECTLY. I WOULD PROVIDE THE CODE (AND WILL IF REQUESTED). BUT IN MY OWN WORDS I AM TRYING TO HAVE THE FIRST FORM DYNAMICALLY CREATE INPUT BOXES...
0
by: Pat Patterson | last post by:
I'm having serious issues with a page I'm developing. I just need some simple help, and was hoping someone might be able to help me out in here. I have a form, that consists of 3 pages of...
2
by: Wysiwyg | last post by:
I'm going back to a previous asp.net (C#) web project after a few months of inactivity and my first form, the login, won't submit. I ran with the debugger and still can't see how to resolve this. I...
6
by: varkey.mathew | last post by:
Hi there, I have a basic form with a postback. The following is a line of dynamic code written so that when the user clicks on the Button control, he will receive a confirm messagebox. ...
4
by: Greg Scharlemann | last post by:
I'm trying to setup a dyamic dropdown list that displays a number of text fields based on the selected number in the dropdown. The problem I am running into is capturing the data already entered...
1
by: Derek Basch | last post by:
I spent several hours struggling with dynamic form fields added with appendChild or innerHTML not POSTing on submit in Firefox. The only way I found to make it work is to append any created fields...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.