Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

from action with query string 2

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I'm having problems with using a query string on a from action.

is it me or is this not possible?

I've hard coder the QS on the acion URL and it seems to get dropped off.

I've used JS to change the action via the onsubmit before returning true.

Nothing seems to work.

Should I conclude that you cannot include a QS on a form submission url?

thanks 1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
sorry can't spell that's a FORM not from

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
are you using POST or GET for the form?

are you retrieving the values with request.form (cos you won't retrieve querystring values with that)

You can just use Var = request("key") which will get both GET and POSTed values, but this does step through all the request collections (session, cookies etc) to get the values so will intoduce a small delay.

POSTing the form will allow you to get both sets of key/value pairs, while GET may append the second set of value with a second "?" (never tested this BTW) so you may need to use request.servervariables to parse out the key/value pairs.





Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
If you have key/value pairs that need to be sent with the form, why not include those items as hidden inputs within the form itself?

- George
 
sorry chris i wasn't really clear, but your post answered my question.

I was being a dumb ass, well it is monday!

I forgot the "GET" method, which adds the vars to the QS by default as i'm submitting to a static HTML form and using JS to parse the QS.

as soon as I added the GET method eveything worked fine.

d'oh!

thanks. :)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
quite right George, but it helps if you include the form method - lol

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top