Can I Request.form and Request.querystring? 
Author Message
 Can I Request.form and Request.querystring?

I have a list of items displayed on a page that the user can click on
to display information specific to that item.  There is some validation
data such as ID, Username and Password that I want to pass in a form as
TYPE=HIDDEN.  Since each item number is different I also have to pass
its data.  The clicked on items HREF is defined to send querystring data
(with the item number) and the onClick will submit the form.  My
receiving ASP does not see the querystring data, only the form data.
How can I send both?

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 18 May 2002 03:00:00 GMT  
 Can I Request.form and Request.querystring?
Help me think this through.  The onClick of the href will submit the form.
So the href is never actually called, because when the form is submitted it
goes to the action of the form.  Correct?  So what you need to do is have a
hidden form field that gets populated with the correct item number as part
of the onClick event.  Unless someone has a better idea.

Kris Eiben
Automation Creations, Inc.

Quote:

>I have a list of items displayed on a page that the user can click on
>to display information specific to that item.  There is some validation
>data such as ID, Username and Password that I want to pass in a form as
>TYPE=HIDDEN.  Since each item number is different I also have to pass
>its data.  The clicked on items HREF is defined to send querystring data
>(with the item number) and the onClick will submit the form.  My
>receiving ASP does not see the querystring data, only the form data.
>How can I send both?



Sat, 18 May 2002 03:00:00 GMT  
 Can I Request.form and Request.querystring?
Unless there is a better way, that's been my thought.  But there's
still one problem.  How does the called ASP know which item was clicked
on?  As I loop through my code I will have to add a HIDDEN INPUT line
for each item since I don't know which item will be clicked on in
advance.  I need some way of telling the called ASP which HIDDEN INPUT
to process.



Quote:
> Help me think this through.  The onClick of the href will submit the
form.
> So the href is never actually called, because when the form is
submitted it
> goes to the action of the form.  Correct?  So what you need to do is
have a
> hidden form field that gets populated with the correct item number as
part
> of the onClick event.  Unless someone has a better idea.

> Kris Eiben
> Automation Creations, Inc.


> >I have a list of items displayed on a page that the user can click on
> >to display information specific to that item.  There is some
validation
> >data such as ID, Username and Password that I want to pass in a form
as
> >TYPE=HIDDEN.  Since each item number is different I also have to pass
> >its data.  The clicked on items HREF is defined to send querystring
data
> >(with the item number) and the onClick will submit the form.  My
> >receiving ASP does not see the querystring data, only the form data.
> >How can I send both?

Sent via Deja.com http://www.deja.com/
Before you buy.


Sun, 19 May 2002 03:00:00 GMT  
 Can I Request.form and Request.querystring?
No, just one hidden form field, called "itemnumber" or something equally
obvious.  Populate it with a dummy value to begin with, then pass the
onClick event the item number and repopulate the hidden field with that
before you submit the form.  In Javascript it'd look something like this
(syntax may not be exactly right, but you get the idea):
<script>
function SubmitMyForm(int itemnum) {
    document.form1.itemnumber.value = itemnum;
    document.form1.submit();
    }
</script>
<a href="javascript:SubmitMyForm(123)">Item 123</a>
<a href="javascript:SubmitMyForm(234)">Item 234</a>
<form name="form1" blah blah>
<input type="hidden" name="itemnumber" value="-1">
</form>

Quote:

>Unless there is a better way, that's been my thought.  But there's
>still one problem.  How does the called ASP know which item was clicked
>on?  As I loop through my code I will have to add a HIDDEN INPUT line
>for each item since I don't know which item will be clicked on in
>advance.  I need some way of telling the called ASP which HIDDEN INPUT
>to process.



>> Help me think this through.  The onClick of the href will submit the
form.
>> So the href is never actually called, because when the form is submitted
it
>> goes to the action of the form.  Correct?  So what you need to do is have
a
>> hidden form field that gets populated with the correct item number as
part
>> of the onClick event.  Unless someone has a better idea.

>> Kris Eiben
>> Automation Creations, Inc.


>> >I have a list of items displayed on a page that the user can click on
>> >to display information specific to that item.  There is some
>validation
>> >data such as ID, Username and Password that I want to pass in a form
>as
>> >TYPE=HIDDEN.  Since each item number is different I also have to pass
>> >its data.  The clicked on items HREF is defined to send querystring
>data
>> >(with the item number) and the onClick will submit the form.  My
>> >receiving ASP does not see the querystring data, only the form data.
>> >How can I send both?



Sun, 19 May 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Need more Request.QueryString and Request.Form help

2. Request.Querystring/Form

3. Problems with listbox and asp and request.querystring.

4. Request.QueryString

5. request.querystring in JavaScript?

6. Request.QueryString

7. VBScript Equivalent to Request.Querystring

8. alternative to Request.QueryString

9. Request.QueryString in Jscript?

10. Merge, Request.QueryString

11. cannot get the Request.QueryString

12. Request.QueryString help

 

 
Powered by phpBB® Forum Software