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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drop down shows text

Status
Not open for further replies.

TheCandyman

Technical User
Sep 9, 2002
761
US
I have a dropdown menu which i would like to show text on certain elements that have :1 value, just not sure how to make it happen. Can someone direct me?



Code:
<select size="1" name="DropDown" onChange="ShowItem(this.value);">
   <option value="20:1">Text</option>
   <option value="35:0">Text</option>
   <option value="17:0">Text</option>
   <option value="7:0">Text</option>
   <option value="56:1">Text</option>
</select>

Code:
<script language="JavaScript" type="text/JavaScript">
   function ShowItem(iEventString) {
     var myString = new String(iEventString);
     var splitString = myString.split(":");
     if (splitString[2] == '1')
      {
         ???
      }
   }


Show this
Code:
<tr><td>some text</td><td>input box goes here</td></tr>
 
what do you mean? where are you trying to show text? what are you trying to show?

fyi - if you use a split of ":" on a string containing "##:#", then the result will only have a [0] and a [1] (not a [2]).



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Your right on the split digit, thx.

I would like to have it show some text "member" and an input box <input type="text" size="20"> Just not sure how to do that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top