coding for a button ?

coding for a button ?

am 14.11.2007 16:29:04 von paul814

How do I code for a submit button when I have radio buttons and
option group lists?

Do I use If then else?

I have an option group list: lstdepartment
I have radio button group: radReadWrite

and a submit button btnsubmit

So I want to do stuff like this:
If RadRead and lstPress is selected, goto "page2"
If RadRead and lstMailRoom is sele4cted goto "page3" etc. when the
button is pressed

how would I do this? where do I put the code?? what would the code be
for something like this?

Code:

"http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Production Report



height="30" />


 


What would you like to do?: span>












Please also select the
department:








value="Submit" />

 





Re: coding for a button ?

am 14.11.2007 17:27:34 von a.nony.mous

paul814@excite.com wrote:

> How do I code for a submit button when I have radio buttons and
> option group lists?

You tell your receiving script what to do. You have not yet specified
one it the 'action' attribute:


and you only need *one* form.

> how would I do this? where do I put the code?? what would the code be
> for something like this?

In the action script. Write it to read the values for each id. Type of
code depends on the language used in your script.

Next time, post a URL instead of code.

--
-bts
-Motorcycles defy gravity; cars just suck

Re: coding for a button ?

am 14.11.2007 17:51:41 von lws4art

paul814@excite.com wrote:
> How do I code for a submit button when I have radio buttons and
> option group lists?
>
> Do I use If then else?
>
> I have an option group list: lstdepartment
> I have radio button group: radReadWrite
>
> and a submit button btnsubmit
>
> So I want to do stuff like this:
> If RadRead and lstPress is selected, goto "page2"
> If RadRead and lstMailRoom is sele4cted goto "page3" etc. when the
> button is pressed
>
> how would I do this? where do I put the code?? what would the code be
> for something like this?

You put the code in the receiving server-side script. The PHP, CGI, ASP,
CFM.... whatever language your use that *should* be listes in the form's
ACTION attribute.

>
> Code:
>
> > "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
>
>
> Production Report
>
>
>


>

> height="30" />


>

 


>

What would you like to do?: > span>


>
>


>
>

>
>

>


>
>

Please also select the
> department:


>

>


>
>


>

>

> > value="Submit" />
>

>

 


>

>
>
>
>


You also have 3 independent forms here. I don't think that is what you
want. Only the name|value pairs within the form that is submitted is
transmitted.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com