FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » for each syntax
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: for each syntax [message #169616 is a reply to message #169614] Sun, 19 September 2010 02:52 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(GarryJones)

> […]
> In this actual case I started with a drop down menu. But the users
> found it difficult to understad why they could not click on the
> <tr><td> to chose the trip they wanted. Ie one click rather than
> opening and selecting from a dropdown menu and then clicking OK.
>
> The <tr><td> are needed for details to explain trip itinery.
>
> So I went with this (Example with 2 forms).
>
> <tr><td>Trip 1 name and details</td>
> <td width="150" valign="middle" class="barstyle">
> <FORM action="boksteg2.php" method="post" name="steg110" id="steg110"
>> <input name="resmalval111" type="hidden" value="110">
> <input type="Submit" value = "Boka NU">
> </FORM>
> </td></tr>

BTW: Forms don't have names. You can remove it from the 'form' tag. You
can also remove the form IDs, unless you need them as targets for links.

> <tr><td>Trip 2 name and details</td>
> <td width="150" valign="middle" class="barstyle">
> <FORM action="boksteg2.php" method="post" name="steg111" id="steg111"
>> <input name="resmalval111" type="hidden" value="111">
> <input type="Submit" value = "Boka NU">
> </FORM>
> </td></tr>
>
> I only want one form Entered. I want it as a one-click operation.

Sure, but it doesn't explain the different names for your hidden fields.
Why not simply do it this way:

[…]
<input type="hidden" name="resmalval" value="110">
<input type="submit" value="Boka NU">
[…]
<input type="hidden" name="resmalval" value="111">
<input type="submit" value="Boka NU">
[…]

Same name for all hidden fields, but different values.

> If the first form is Submitted it sends 110 to the next page
> If the second form is Submitted it sends 111 to the next page
>
> Bascially I need is x number of submit buttons that send x number of
> unique values to the next page. My method works.

But it's more complicated than necessary.

Micha
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: Illegal variable _files
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 27 09:25:42 GMT 2024

Total time taken to generate the page: 0.04161 seconds