Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic list disappears

Status
Not open for further replies.

nrenfree

Programmer
Joined
Apr 14, 2006
Messages
5
Location
US
I have created a PHP page where the user clicks on a word in a ListBox containing a list of words retrieved from a MySQL database. When the user clicks a word, a picture representing that word appears on another part of the screen.

Clicking the word submits the form the ListBox is a part of and sends a URL variable that is used to get a value from another SQL table that is used to create the source path to the image.

When the word is clicked, the list of words disappears. I would REALLY like the list to stay visible so the user can click another word if they wish.

Here is the code for the listbox:

Code:
<select name="vocabList" size="10" class="style5" id="vocabList" onchange="MM_setTextOfTextfield('vocabWrdChosen','',''+(vocabList[vocabList.selectedIndex].text)+'');document.frmWrdList.submit()">
        <?php
do {  
?>
        <option value="<?php echo $row_wrdList['picID']?>"><?php echo $row_wrdList['vocabWord']?></option>
        <?php
} while ($row_wrdList = mysql_fetch_assoc($wrdList));
  $rows = mysql_num_rows($wrdList);
  if($rows > 0) {
      mysql_data_seek($wrdList, 0);
	  $row_wrdList = mysql_fetch_assoc($wrdList);
  }
?>
      </select>

This must be possible. As someone just learning, I haven't been able to find the answer.

Any suggestions?

Thank you so much for your help,

Nancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top