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:
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
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