Ask a Question related to ASP Database, Design and Development.
-
djc #1
question on form element type 'submit'
(using IE/asp/ado)
I have a few reports that all take the same parameter. I would like to give
one input box and put 3 buttons next to that one inputbox for selecting
which report to run on that parameter. I have 2 questions concerning this:
1) How do I pass to the asp code which button was pressed? I have passed the
contents of a text input box from the click of a submit button before but
not a 'value' of a button itself? can I? how to?
2) Should I have all those buttons just submit to the same asp page or have
each one go to its own asp page? I know technically I should be able to do
either but is there a general rule of thumb I should know about?
Thanks in advance.
djc Guest
-
submit form question
I need the form to submit as soon as the page loads, before they go to another page, and without any interaction from the viewer. Is this... -
Form Submit question
Hi all, I am attempting to create a form that allows single radio selection (in a multiple select) and submitting it to a PERL CGI script. I... -
Serialize complex type element with simple content
Hi, This must be easy, but I can't find an example: I want to automatically serialize an element with an attribute like the following... -
#25366 [NEW]: form buttons of type "image" dont send "submit" $_POST variable in IE
From: jordanolsommer at imap dot cc Operating system: Windows XP PHP version: 4.3.2 PHP Bug Type: Variables related Bug... -
Submit Form Question ... please help.
I tried adding the validation using the "FormCheck". It did not work. Any other ideas? I am very new to HTML ... so if anyone could supply an... -
Nicole Calinoiu #2
Re: question on form element type 'submit'
The submit button that was used to submit the form will have its name/value
pair included in the request's form variables collection (if it's a post) or
query string (if it's a get). Any other submit elements on the form will
not have their name/value pairs passed in the request. Let's say you have
the following form:
<form method=post>
<input type=submit name=Rpt1 id=Rpt1 value="Report 1">
<input type=submit name=Rpt2 id=Rpt2 value="Report 2">
</form>
On the server side, you can detect which button was clicked based on the
name/value pair. e.g.:
if LenB(Request.Form("Rpt1")) > 0 then
'report 1 button was clicked
elseif LenB(Request.Form("Rpt2")) > 0 then
'report 2 button was clicked
else
'neither button was clickeed
end
You could also give all the buttons the same name then only check the value
against this name. However, this isn't a good solution if the UI text might
change (e.g.: because of localization or other data-driven UI labeling).
HTH,
Nicole
"djc" <noone@nowhere.com> wrote in message
news:eLwxYIlmDHA.1096@TK2MSFTNGP11.phx.gbl...give> (using IE/asp/ado)
> I have a few reports that all take the same parameter. I would like tothe> one input box and put 3 buttons next to that one inputbox for selecting
> which report to run on that parameter. I have 2 questions concerning this:
>
> 1) How do I pass to the asp code which button was pressed? I have passedhave> contents of a text input box from the click of a submit button before but
> not a 'value' of a button itself? can I? how to?
>
> 2) Should I have all those buttons just submit to the same asp page or> each one go to its own asp page? I know technically I should be able to do
> either but is there a general rule of thumb I should know about?
>
> Thanks in advance.
>
>
Nicole Calinoiu Guest
-
djc #3
Re: question on form element type 'submit'
Thanks!
"Nicole Calinoiu" <nicolec@somewhere.net> wrote in message
news:uSLGtjJnDHA.1672@TK2MSFTNGP09.phx.gbl...name/value> The submit button that was used to submit the form will have itsor> pair included in the request's form variables collection (if it's a post)value> query string (if it's a get). Any other submit elements on the form will
> not have their name/value pairs passed in the request. Let's say you have
> the following form:
>
> <form method=post>
> <input type=submit name=Rpt1 id=Rpt1 value="Report 1">
> <input type=submit name=Rpt2 id=Rpt2 value="Report 2">
> </form>
>
> On the server side, you can detect which button was clicked based on the
> name/value pair. e.g.:
>
> if LenB(Request.Form("Rpt1")) > 0 then
> 'report 1 button was clicked
> elseif LenB(Request.Form("Rpt2")) > 0 then
> 'report 2 button was clicked
> else
> 'neither button was clickeed
> end
>
> You could also give all the buttons the same name then only check themight> against this name. However, this isn't a good solution if the UI textthis:> change (e.g.: because of localization or other data-driven UI labeling).
>
> HTH,
> Nicole
>
> "djc" <noone@nowhere.com> wrote in message
> news:eLwxYIlmDHA.1096@TK2MSFTNGP11.phx.gbl...> give> > (using IE/asp/ado)
> > I have a few reports that all take the same parameter. I would like to> > one input box and put 3 buttons next to that one inputbox for selecting
> > which report to run on that parameter. I have 2 questions concerningbut> the> >
> > 1) How do I pass to the asp code which button was pressed? I have passed> > contents of a text input box from the click of a submit button beforedo> have> > not a 'value' of a button itself? can I? how to?
> >
> > 2) Should I have all those buttons just submit to the same asp page or> > each one go to its own asp page? I know technically I should be able to>> > either but is there a general rule of thumb I should know about?
> >
> > Thanks in advance.
> >
> >
>
djc Guest



Reply With Quote

