Jump to content

Search the Community

Showing results for tags 'dropDown list'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 3 results

  1. I incorporated the "Dropdown in TopNav" code, but I have a dropdown list that's over 70 items long. How would I incorporated a scrolling function to this menu, or make it possible to view all the entries by scrolling down using the mouse wheel? Thanks!
  2. Hello & Thanks , I have a small DropDownList with 3 options . Problem is when I select , let's say , 2nd option . No probs , a new page is opened . If I click on option 1 or 3 , no probs . However , if I click on 2nd option again , instead of clicking on 1 or 2 , no new page is opened . Is there a way to correct this , so that clicking on whatever always opens a new window . Thanks...Vern <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>myFavs-HtmlProbs.html</title> <meta name="Generator" content="PureBasic"> <meta name="Description" content="Your description here..."> <meta name="Description" content="...Created by myFavs % PureBasic..."> <style type="text/css"> </style> </head> <body text="#000000" style="background-color:#A69E80; text-align:center;"> <br> <br> <br> <!--dd <div style=--> <table width="100%" border="0" style="text-align:center" cellspacing="0" cellpadding="0"> <tr style="text-align:center"> <!-- EXAMPLE: <MenuName="aaMost-Used"> --> <!-- rgb(250,240,255) --> <select style="width:200px; font:14px Arial Black; color:rgb(0,0,0); background- color:rgb(231,169,126);" name="menu" onchange="window.open(this.value)"> <option selected="0" value="">aaMost-Used</option> <option value="http://alternativeto.net/">AlternativeToSoftwares</option> <option value="https://www.biblegateway.com/reading-plans/chronological/today? version=NLT">One Year Chronological Bible NLT</option> <option value="http://www.portablefreeware.com/">portablefreeware.com/</option> </select></td></tr></table><br></body></html>
  3. Dear Members, I am struggling with setting up the value of a dynamic dropdown list object to a given value using javascript so that it will show the respective element text in the list automatically. I would try to enumerate the steps we are going through for lucidity. Let me know if you need more information. 0. We want to generate two dropdown lists, both get populated using database queries via a php code. That means we just create the select objects and assign them ids (say listOne, and listTwo), which will later be used to populate the lists (i.e., values-text pairs) programmatically using javascript and php. 1. First list is static and never changes in the application once populated. We do this by using formatted "echo" statements in our php code by using something similar to:- for($i=0; $i<$nrows; $i++) { echo "<option value="".$response[$i]['columnId1']."">".$response[$i]['columId2']."</option>n"; } If you look at the html code of the page now (may be by using "view page source" option from the browser), you will see a list of html option tags under the select tag for this list. The content of the list is exactly the way we want. 2. The second list is dynamic that means it gets created by querying the database each time a value in the listOne gets selected or changes. We append the value-option pair using appendChild() function something like this:- var select = document.getElementById('listTwo'); for (var i = 1; i<=max; i++){ var opt = document.createElement('option'); opt.value = i; opt.textElemet = data; select.appendChild(opt); } where "data" is an array that we get from querying database. Since this list is created on the fly, there are no footprints in the html code what so ever about the content of the list. That means you see nothing but an empty select object if you view the html code. However, the content of the list is exactly the way we want. It is just that it is hidden. 3. We are struggling to find a way to set the value of listTwo to a particular "value" once the list is populated. This task is fairly straight forward for any static dropdown list similar to "listOne" using:- document.getElementById("listOne").value = aValue; 4. How would you do the same for a dynamic dropdown list similar to "listTwo"? Thanks for your time and suggestions, gaurav
×
×
  • Create New...