Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old May 10th, 2004, 03:48 AM
timlab timlab is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: walden,ny
Posts: 77 timlab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
drop down menu - auto

I'm tried of making people hit the submit button everytime they use my drop down menus. Is there a way that once they click on an item, then that one item will be sent to another form? Here is my code:
php Code:
Original - php Code
  1.  
  2. </head>
  3. <body>
  4. <?php
  5. $i = 1;
  6. $fp = fopen("$DOCUMENT_ROOT/test/States.txt", 'r');
  7.   $statename = array();
  8.      while (!feof($fp))
  9.    {
  10.    $state = fgets($fp,999);
  11.  
  12.   // echo $order;
  13.     $statename[$i] = $state;
  14.     $i++;
  15.  
  16.    }
  17.  
  18.    fclose($fp);
  19.  
  20.     echo "<form action='http://www.urspot.net/test/city.php' method='post'>n";
  21.     echo "<select name='state'>n";
  22.     for ($i=1;$i<=5;$i++)
  23.      {
  24.     echo "<option value=$statename[$i]n";
  25.     echo "> $statename[$i]n";
  26.     }
  27.    echo"</select><noscript><INPUT type='submit' value='Go' name=submit></noscript>";
  28.    echo "</form>";
  29.  ?>
  30.  
  31.  
  32. </body>
  33. </html>

I have searched and searched and no luck. Can someone help me please?

Reply With Quote
  #2  
Old May 11th, 2004, 04:23 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: drop down menu - auto

Code:
onChange="document.formName.submit();"
or something like that

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > drop down menu - auto


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT