User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 374,154 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,449 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 752 | Replies: 4
Reply
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

the title attribute of the SELECT tag is not supported????

  #1  
Apr 2nd, 2008
I created a user registration page using ASP and Dreamweaver, I tried to create a drop down box filled with options from a database. I only wanted the box to contain one of each option but it contains every one, one for each user when i view this in firefox. when i view the page in explorer the box does not contain anything and the options are all listed below the box.

part of the code is underlined, when i hover over it i get an message 'The title attribute of the SELECT tag is not supported [Netscape Navigator 4.0, Netscape Navigator 6.0]' I do not know what this error means, is this why the drop down box won't work??

heres part of my code, the line in red is the line that is underlined:-

Dim rs_accesslevel
Dim rs_accesslevel_numRows

Set rs_accesslevel = Server.CreateObject("ADODB.Recordset")
rs_accesslevel.ActiveConnection = MM_dbtest_STRING
rs_accesslevel.Source = "SELECT accesslevel FROM users"
rs_accesslevel.CursorType = 0
rs_accesslevel.CursorLocation = 2
rs_accesslevel.LockType = 1
rs_accesslevel.Open()

rs_accesslevel_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>register</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<h3>Please register new user below:-</h3>
<form action="<%=MM_editAction%>" method="POST" name="formregister" id="formregister">
  <table width="528" height="136" border="1">
    <tr>
      <td width="153">username</td>
      <td width="359"><input name="txtusername" type="text" id="txtusername" size="50"></td>
    </tr>
    <tr>
      <td>password</td>
      <td><input name="txtpassword" type="password" id="txtpassword" size="20"></td>
    </tr>
    <tr>
      <td>Access level</td>
      <td><select name="accesslevel" title="<%=(rs_accesslevel.Fields.Item("accesslevel").Value)%>"><input name="txtaccesslevel" type="text" id="txtaccesslevel" size="50">
        <%
While (NOT rs_accesslevel.EOF)
%>
        <option value="<%=(rs_accesslevel.Fields.Item("accesslevel").Value)%>" <%If (Not isNull((rs_accesslevel.Fields.Item("accesslevel").Value))) Then If (CStr(rs_accesslevel.Fields.Item("accesslevel").Value) = CStr((rs_accesslevel.Fields.Item("accesslevel").Value))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(rs_accesslevel.Fields.Item("accesslevel").Value)%></option>
        <%
  rs_accesslevel.MoveNext()
Wend
If (rs_accesslevel.CursorType > 0) Then
  rs_accesslevel.MoveFirst
Else
  rs_accesslevel.Requery
End If
%>

Thanks!
Any ideas gretaly apprecitated!

GLT
Last edited by peter_budo : Apr 3rd, 2008 at 11:29 am. Reason: Please use [code] tags instead of italic [I]
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2008
Posts: 20
Reputation: techtix is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
techtix techtix is offline Offline
Newbie Poster

Re: the title attribute of the SELECT tag is not supported????

  #2  
Apr 3rd, 2008
2 things:

1. Title is not a w3c standardized attribute for the SELECT tag. Don't use it
http://www.w3.org/TR/REC-html40/inte...ms.html#h-17.6

2. You have an INPUT tag nested into your SELECT tag
      <td><select name="accesslevel" title="<%=(rs_accesslevel.Fields.Item("accesslevel").Value)%>"><input name="txtaccesslevel" type="text" id="txtaccesslevel" size="50">
        <%

Move this above or below the SELECT closing tag
Reply With Quote  
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Re: the title attribute of the SELECT tag is not supported????

  #3  
Apr 4th, 2008
Hi, Thanks for getting back to me.

I moved the input line above and below the select bit but that just created an input box above or below the drop down box depending where i put it.

Any other ideas?? or where exactly do you mean to put it??

Thanks!

GLT
Reply With Quote  
Join Date: Apr 2008
Posts: 20
Reputation: techtix is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
techtix techtix is offline Offline
Newbie Poster

Re: the title attribute of the SELECT tag is not supported????

  #4  
Apr 4th, 2008
Perhaps I may be confused with the question, but the SELECT element is a dropdown list by nature. The INPUT element is another form element and the inclusion of it within the SELECT element is why you are seeing odd results. I'm thinking you are trying to make a combo box. I'd really just remove it alltogether.

If you are looking to make a combo box where you type and find the item in a list, that's a different story and would require different code. Presumably, you would want to place the INPUT element directly above the SELECT element, but you would require JavaScript events to search the list. You would also need DHTML if you wanted the list to open and close like a combo box.

I forgot one other item in the previous post. Use the DISTINCT qualifier in your SQL statement to avoid the duplicate entries.
rs_accesslevel.Source = "SELECT DISTINCT accesslevel FROM users"
Reply With Quote  
Join Date: Apr 2008
Posts: 34
Reputation: pmpn is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
pmpn pmpn is offline Offline
Light Poster

Re: the title attribute of the SELECT tag is not supported????

  #5  
Apr 14th, 2008
try following

  1. <td><input value="<%=(rs_accesslevel.Fields.Item("accesslevel").Value)%>" name="txtaccesslevel" type="text" id="txtaccesslevel" size="50">
  2. <select name="accesslevel">
  3. <%
  4. While (NOT rs_accesslevel.EOF)
  5. %>
  6. <option value="<%=(rs_accesslevel.Fields.Item("accesslevel").Value)%>" <%If (Not isNull((rs_accesslevel.Fields.Item("accesslevel").Value))) Then If (CStr(rs_accesslevel.Fields.Item("accesslevel").Value) = CStr((rs_accesslevel.Fields.Item("accesslevel").Value))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(rs_accesslevel.Fields.Item("accesslevel").Value)%></option>
  7. <%
  8. rs_accesslevel.MoveNext()
  9. Wend
  10. %>
  11. </select>
  12. <%
  13. If (rs_accesslevel.CursorType > 0) Then
  14. rs_accesslevel.MoveFirst
  15. Else
  16. rs_accesslevel.Requery
  17. End If
  18. %>
Last edited by peter_budo : Apr 20th, 2008 at 6:45 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP Marketplace
Thread Tools Display Modes

Other Threads in the ASP Forum

All times are GMT -4. The time now is 3:28 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC