Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Select Tag" 1

Status
Not open for further replies.

planman

Programmer
Apr 24, 2001
7
CA
I'm interested in finding out if anyone knows a way to get
the scrolling window created for Select Tags to "jump" for more than one keyboard character. I have Select Tags with hundreds of options and being able to type in the first character to select on is helpful, but what would be more helpful would be able to quick-type several characters to extend the search past the first character to the second and subsequent characters as with Microsoft Windows Explorer keyboard input for filename selection once the Name
button has been clicked on the Contents header bar...

I am not sure if this is an HTML limitation or a browser limitation. I'm currently using I.E. 5.0... any ideas or suggestions would be appreciated and save my users a lot of time...
 
Thanks Mighty! :-D

I placed the files from the Zip Archive into the same directory as my ASP stuff and the demo ran fine. I write most of my ASP code using VBScript. I am trying to incorporate the ComboBox code and I'm running into some problems. I am using IE5.0 for a browser. I am told that ComboBox is undefined at the -->
dm=new ComboBox("dm")
<-- line in the following code snippet.
Could you please help me pinpoint my ineptitude...:~/
---------------------------------------------------
<% Response.Buffer = True %>
<!--
Dummy1.asp

Selection of tasks for editing
-->

<!-- METADATA TYPE=&quot;typelib&quot; UUID=&quot;00000200-0000-0010-8000-00AA006D2EA4&quot; NAME=&quot;ADO Type Library&quot; -->

<%

'Instantiate Recordset objects
Set rstTsk = Server.CreateObject(&quot;ADODB.Recordset&quot;)
Set rstPrg = Server.CreateObject(&quot;ADODB.Recordset&quot;)


'Define SQL query.
strSQLPrg = &quot;SELECT * FROM Programs ORDER BY Program_Code&quot;

'Open record sets using the Open method
'and use the connection established by the Connection object.
' rstPrg.Open strSQLPrg, conntemp

dtable = Request.QueryString(&quot;dtable&quot;)
Select Case dtable
Case &quot;Tasks9900&quot;
ctable = &quot;Costs9900&quot;
ttable = &quot;R&D Program for 1999/2000&quot;
eform = &quot;TE9900.asp&quot;
Case &quot;Tasks0001&quot;
ctable = &quot;Costs0001&quot;
ttable = &quot;R&D Program for 2000/2001&quot;
eform = &quot;TE0001.asp&quot;
Case &quot;Tasks0102&quot;
ctable = &quot;Costs0102&quot;
ttable = &quot;R&D Program for 2001/2002&quot;
eform = &quot;TE0102.asp&quot;
End Select

%>

<HTML>
<HEAD>
<TITLE>R&D Proposal Form</TITLE>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>

<script src=&quot;ieemu.js&quot; language=&quot;JavaScript&quot;></script>
<script src=&quot;ComboBox.js&quot; language=&quot;JavaScript&quot;></script>

</HEAD>
<BODY BACKGROUND=&quot;../../rdplan/paper.gif&quot; BGCOLOR=&quot;#FFFFFF&quot;>
<!-- #include file = &quot;header.inc&quot; -->
<FONT COLOR='#0c0a77'><H2><%= ttable %></H2></FONT>
<H3>Task maintenance</H3>
All endorsements must be cancelled before a task can be edited.<P>



<FORM NAME='EF' ACTION='\scripts\company\<%= eform %>'>
<INPUT TYPE=hidden NAME=&quot;Category&quot; VALUE=&quot;Existing&quot;>

<script language=&quot;JavaScript&quot;>

dm=new ComboBox(&quot;dm&quot;)

dm.add(
new ComboBoxItem(&quot;barge&quot;,1),
new ComboBoxItem(&quot;benluc&quot;,2),
new ComboBoxItem(&quot;benlieeeeck&quot;,3),
new ComboBoxItem(&quot;taco&quot;,4)
)

</script>

<%
If Request.Cookies(&quot;GODMode&quot;) = &quot;True&quot; Then
strSQLTsk = &quot;SELECT Task, Project_Title FROM &quot; & dtable & &quot; ORDER BY Task&quot;
rstTsk.Open strSQLTsk, conntemp
line2 = &quot;All proposals appear in the list below<BR>&quot;

... <etc>
 
all that combo box stuff is not JavaScript code. Klae

You're only as good as your last answer!
 
If you keep giving out one liners that act as teasers and
provide no useful information as a followup then I would suggest that you change your signature line... your last
answer left something to be desired!
 
I took the original code and imbedded it. In the original code there was no specification of language for scripting:

<script>

dm=new ComboBox(&quot;dm&quot;)

dm.add(
new ComboBoxItem(&quot;barge&quot;,1),
new ComboBoxItem(&quot;benluc&quot;,2),
new ComboBoxItem(&quot;benlieeeeck&quot;,3),
new ComboBoxItem(&quot;taco&quot;,4)
)

</script>
...

I just wish to make a simple enhancement but I'm stumped...
Perhaps I'll take this to the ASP forum... :-I

 
combobox equivalents in HTML are like this (no need for javascript)


Code:
<select id=select1 name=select1>
<option>option 1</option>
<option>option 2</option>
</select>
Klae

You're only as good as your last answer!
 
Thanks Klae:

The reason I didn't want a Select Tag was stated in the original post... I require the functionality of scrolling down to a selection by typing (in sequence) more than one character. The Select Tag only allows for the first character of a selection to be used as such. Any idea why
ComboBox seems to be undefined after inclusion of ComboBox.js???
 
If you are going to use Jaredn's code then hopefully Jaredn won't mind if you take the linked .js code that you need to complete this very good combobox code. click on the link
and then delete &quot;index.htm&quot; and put in &quot;ComboBox.js&quot; (URL IS CASE-SENSITIVE!) and then you can see the functions that create the comboboxes and that are called by the code that you have successfully obtained. Hopefully now I have read the complete thread and seen the Jaredn code, I can now stop embarrassing myself :). Klae

You're only as good as your last answer!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top