Results 1 to 2 of 2

Thread: Drop down menu

  1. #1
    Join Date
    Jan 2005
    Posts
    362

    Unanswered: Drop down menu

    I want to create with asp a "menu" that will have a dynamicall drop down menu.
    Is there any ready drop down or a tutorial for this?
    Thank you
    dimis

  2. #2
    Join Date
    Mar 2006
    Location
    south jersey, usa
    Posts
    53
    this script gives me a list of users from a application's sql database

    Code:
    dim srs
      sqlserver = request.form("db") 'get database name from input
      sqluser = request.form("user") 'get sql user from input
      sqlpwd = request.form("pass") 'get sql pwd from input
      sqldb = request.form("dbname") 'get db name from input
      set sconn = CreateObject("ADODB.Connection") 'prep connection to sql 
      set srs = CreateObject("ADODB.Recordset") 'prep recordset for login names
      sconn.open "PROVIDER=SQLOLEDB;DATA SOURCE=" & sqlserver & ";UID=" & sqluser &_
                 ";PWD=" & sqlpwd & ";DATABASE=" & sqldb 'connect to sql 
    query = "select loginname from irsysusers where status = 12 order by loginname"
      srs.open query, sconn
      if srs.eof then 
        response.write "NO USERS FOUND IN DATABASE, CONTACT SYSTEMS DEPT"
      else 
        response.write "<select name=iruser><OPTION VALUE='%'>ALL USERS</OPTION>"
        do until srs.eof 
          response.write "<option>" & srs.fields("loginname") & "</option>" 
          srs.movenext 
        loop
        response.write "</select><br><br><input type=submit value='Get Rights'></form>" 
      end if
      srs.close     
      sconn.close
    "They say Moses split the Red Sea
    I split the blunt and rolled the fat one, I'm deadly"
    -- Tupac 'Blasphemy'

Posting Permissions

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