Trouble w/ DropDown Boxes

Results 1 to 2 of 2

Thread: Trouble w/ DropDown Boxes

  1. #1
    Join Date
    Dec 1969

    Default Trouble w/ DropDown Boxes

    Im having trouble w/ entering data into a dropdown list box. I am using this for an entry form and would like to have a list of items for the user to enter. If the desired item is not included in the list, they should be able to type in a new item. Can anyone help me?

  2. #2
    BIMAL Guest

    Default Trouble w/ DropDown Boxes

    Well, if you are using plain ASP .. I does not work.. You need to have Java script also to achieve this.. steps are below. Next to your combo have a Image.. If the data is not available in the list he will click on the Image. Then populate INPUTBOX() function of VB to accept the value and If you need to insert this database, Then make a connection to database and Insert the records.. + You need to have a javascript pass the value. Call the Java script with in the VB code, by passing the new value accepted thru Input box.. This will add value to List box..I&#039m attaching a sample code below.. It works pretty fine with me..<BR>This bit of code is only for inserting data to drop down list..<BR><BR>&#060;script language=javascript&#062;<BR>function load1(p1)<BR>{<BR>var ooption, slist;<BR><BR>slist = eval("document.all.select2")<BR>ooption = document.createElement("OPTION");<BR>ooption.text = p1;<BR>ooption.value = p1;<BR>slist.add(ooption);<BR>ooption.selected = true;<BR>}<BR>&#060;/script&#062;<BR>I hope it works...<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts