HTML5 datalist
HTML5 datalist
(OP)
I'm just playing around with new html tags.
Here is my first experiment, dynamic list box.
Here is my code:
<input list="frmUsers">
<datalist id="frmUsers">
<%
sql="select FName+ ' ' +LName AS FullName, UID from members"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 1, 3
If NOT rs.EOF Then
While NOT rs.EOF
%>
<option value="<%=rs("UID")%>"><%=rs("FullName")%></option>
<%
rs.MoveNext
WEND
End If
%>
</datalist>
Naturally, that wont work. That's what I use right now in my pages (except encrypted).
How can it off using datalist?
Thanks.
RE: HTML5 datalist
Chris.
Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
RE: HTML5 datalist
Why not?
What does the actual HTML look like after its been rendered by the ASP?
The HTML 5 datalist will look like a standard input box, but after you click on it it will show the options.
What is not working?
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Web & Tech
RE: HTML5 datalist
I need to pass the UID value.
RE: HTML5 datalist
Until we see the rendered HTML we have no idea what you are talking about.
Chris.
Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
RE: HTML5 datalist
datalist is implemented inconsistently across the browsers :
If you want consistent behavior, you have to use a JavaScript implementation, for example the jQuery UI Autocomplete. Which of course, is slower then the native implementations.
So, what exactly you want to achieve and in which browser ?
Feherke.
feherke.ga
RE: HTML5 datalist
So it looks like DataList would only work with Gecko.
Thanks for the info.
For those that asked, here is the rendering from my script (all fictitious data)
<input list="frmUsers">
<datalist id="frmUsers">
<option value="1">Tony Adams</option>
<option value="6">Anna Banana</option>
<option value="7">Marvin Martian</option>
<option value="8">Elmer Fudd</option>
<option value="12">Marvin Skalansky</option>
<option value="13">Dang Ed</option>
<option value="14">Oscar Lujan</option>
<option value="17">Paul Ortiz</option>
<option value="40">Mike Spencer</option>
<option value="42">Brian Branko</option>
<option value="110">Donald Winters</option>
<option value="113">Dan gonzales</option>
<option value="120">Fred Nelson</option>
</datalist>