Jump to content

Drop down box that shows a specific table.


Lucky2710

Recommended Posts

I have leader boards on my site (Currently just overall) But i want o include weekly as well without showing them all at one time. So i want to create a drop down box that is like this...

<form id="weekSelect" name="weekSelect" method="post" action="">
  <label>Week  
    <select name="weeks" id="weeks">
      <option value="Overall">Overall</option>    
      <option value="Week1">1</option>
      <option value="Week2">2</option>
      <option value="Week3">3</option>
      <option value="Week4">4</option>
      <option value="Week5">5</option>
      <option value="Week6">6</option>
      <option value="Week7">7</option>
      <option value="Week8">8</option>
      <option value="Week9">9</option>
      <option value="Week10">10</option>
      <option value="Week11">11</option>
      <option value="Week12">12</option>
      <option value="Week13">13</option>
    </select>
  </label>
</form>

 

A user will select which week to view and then below this a table populated with the top 20 users will show up.

 

How do i go about making this form show a certain table depending on which week is selected?

 

Thanks  :D

 

http://www.phpfreaks.com/forums/index.php/topic,115581.0.html is the link to the basic working ajax example.  Then of course you'll need to modify it to do what it is you want.

 

I personalled learned ajax using prototype, from the Sams Teach Yourself Ajax, Javascript and PHP all in one book.  It gives you a basic understanding of ajax, but gives you the knowledge to be able and expand that to do whatever you want to do.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.