SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    onclick submit form

    I have the following code that displays 4 drop down menues in a table. Is there a way to submit onclick when its mixed with the PHP like this. The reason being I want all lists to display for choices, but user can only pick one.

    <form action="<?=$PHP_SELF?>" method="post">
    <table>
    <tr><td>REGION/td><td>AREA/td><td>COUNTY/td><td>CITY/td></tr>
    <tr>
    <td><SELECT name="region"><? echo "$region_block"; ?></td>
    <td><SELECT name="area"><? echo "$area_block"; ?></td>
    <td><SELECT name="county"><? echo "$county_block"; ?></td>
    <td><SELECT name="city"><? echo "$city_block"; ?></td>
    </tr>
    </table>

    </SELECT>

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: onclick submit form

    You could try this. Not sure though.

    PHP Code:

    <form action="<?=$PHP_SELF?>" method="post" name="selector">
    <table>
    <tr><td>REGION:</td><td>AREA:</td><td>COUNTY:</td><td>CITY:</td></tr>
    <tr>
    <td><SELECT onChange="selector.submit();" name="region"><? echo "$region_block"?></td>
    <td><SELECT onChange="selector.submit();" name="area"><? echo "$area_block"?></td>
    <td><SELECT onChange="selector.submit();" name="county"><? echo "$county_block"?></td>
    <td><SELECT onChange="selector.submit();" name="city"><? echo "$city_block"?></td>
    </tr>
    </table>

    </SELECT>
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •