Type ahead in drop down lists

Hi, I would like to be able to type ahead in drop down lists. E.g. with an alphabetical drop down list having
Scott
Sean
Soo
Steven
I would like to be able to position within that drop down list by typing e.g. st and land upon steven, however when I key in st, I find myself at the top of the entries in the drop down list starting with t.
Any ideas? Something I overlooked?
Best regards, Jesper

Jesper,
I admit that I don't fully understand how it all works, but I'll explain the general steps I took to get it working. Hopefully some of the smart people here can show us a better way to do it.
I don't think that I should post the actual javascript file because the first line of it says:
"// Copyright 2004 and onwards Google Inc."
But, you can get the original version of it here: http://www.google.com/ac.js
If you save it and a copy of the page that calls it on your local web server, you can play around with it.
It looks like a real mess. This guy has dissected it: http://serversideguy.blogspot.com/2004/12/google-suggest-dissected.html
From all that, you can see that the end result is that the script calls a URL like this, with your query at the end:
http://www.google.com/complete/search?hl=en&js=true&qu=transparent%20aluminu
Which returns a result like this:
sendRPCDone(frameElement, "transparent aluminu", new Array("transparent aluminum", "transparent aluminum 3m"), new Array("426,000 results", "31,900 results"), new Array(""));
The script can be edited to call any URL. I changed it to call a stored procedure on my HTML DB web server. The changes were:
Line 3: Change pn="search" to pn="schema.package.procedureName"
Line 14: Change else E="/complete/" to E="/pls/htmldb/" (The Location entry set in your Marvel.conf)
You then need to create a stored procedure that will be called from Line 3.
It needs to have 3 varchar2 parameters called qu, hl, and js. The first one is the query string. I didn't use the other two.
It needs to return a message like the script is expecting - with the results concatenated in comma-separated arrays. Here is a simple example:
create procedure INCSEARCH(qu varchar2, hl varchar2, js varchar2) as
l_List1 varchar2(4000);
l_Query varchar2(255);
l_separator varchar2(10) default '';
begin
l_Query := qu || '%';
for x in (select Last_Name from hr.Employees where Upper(Last_Name) like Upper(l_Query) order by 1)
loop
l_list1 := l_List1 || l_separator || '"' || x.Last_Name || '"';
l_separator := ',';
end loop;
owa_util.mime_header('text/html', false);
owa_util.http_header_close;
htp.p('sendRPCDone(frameElement, "'|| qu ||'", new Array(' || l_List1 || '), new Array(' || l_List1 || '), new Array(""));');
end;
Grant Execute on INCSEARCH to Public;
The last step is to hook it into HTML DB. Examining the Google page shows that they run a script called InstallDC to hook the script to a form field.
In the Footer section of the Page Attributes of my page, I added this:
<SCRIPT src="/ac.js"></SCRIPT>
<SCRIPT>InstallAC(document.wwv_flow,document.wwv_flow.p_t03,document.wwv_flow.p_t03,"dc_htmldb.incsearch","en");</SCRIPT>
Where p_t03 is the name of the text field I want it attached to, and "dc_htmldb.incs.incsearch" is my stored procedure.
Those are the basic steps. Does anyone have a cleaner approach?

Similar Messages

  • Is it possible to allow use to type entry into a drop down list box ?

    Hi ,
    Is it possible to provide  type in the value option ( provide option to user like he can select a value from the extracted data in a drop down list object and also he can enter a value manually ) to a drop down list box on an interactive form ?
    Nanda

    Hello Nanda,
    In the Adobe LiveCycle Designer you can specify several list items for objects of type 'Drop-down List' and it is also possible to allow custom entries (checkbox: "Allow Custom Text Entry").
    Regards,
    Philipp

  • Addining additional page types or styles to the pages icon drop down list

    in the tool bar - pages - i have one page of latintype of text as the only choice. How do I add other types of page layout or templates to this drop down list that only has the one page of weird text on it?
    I am stuck. thanks.

    Hello pbmb,
    Pages is a document-centric editor. That means all you editings and saves will stored in the document. This is why Pages provides templates. It is like heaving a library of documents, sections and objects. So if you need something often, create a template of it and you will have it with two clicks at hand. Yes, it would be nice to have real customer created libraries of paragraph styles and objects or masks, directly at hand by one click like the Pages objects, etc. Maybe this will come in next versions when Pages will grow up more and more.
    I can't imagine why the section templates (Pages names it pages, too) doesn't work for you the way I described in this thread. You wrote above you have saved it as a document. Have you opened exact this document and the saved creations were not there? I only want to solve this problem, so please write to us if a saved document template (menu: "File/Save as Template...") with such created section templates are not working fine.
    I know it can be frustrated not to achieve the goals easily or not in the way we know right. Pages goes an other way and - despite little adversities - I find the workflow and handling very good. I am missing some features to name Pages a pro app, but I have done some pro designs with it. If you are interested in using Pages further more, I will write an in-depth tutorial about the topic "Section Templates".

  • Drop Down List population - Abap dynpro adobe form - type ZCI

    Hi ,
    How to create drop down list on a field. I am using ZCI type of form. (Abap dynpro adobe form - type ZCI)
    Most of the post i have seen only refers to the setting in forms but not about the settings in interface in se80 or SFP. please give me the detail steps to create drop down field and how to populate it.
    In other words is how to populate the drop down fields, where does the values come from to these fields.
    Thanks,
    Nikhil
    Edited by: NIKHILKUMAR POOJARI on Apr 3, 2009 7:28 PM

    HI Pradeep,
    Can you please tel me what i am doing worng here :
    types : begin of ty_nameid,
                  ZCARRIAGERESTRIC type ZCARRIAGERESTRICT,
                  DESCRIPTION type ZDESCRIPTION,
                END OF ty_nameid,
                tyt_nameid TYPE TABLE OF ty_nameid.
        data  : it_nameid type tyt_nameid,
                wa_nameid TYPE ty_nameid.
        DATA lo_nd_name TYPE REF TO if_wd_context_node.
        DATA lo_nd_nameid TYPE REF TO if_wd_context_node.
        DATA lo_el_nameid TYPE REF TO if_wd_context_element.
        DATA ls_nameid TYPE wd_this->element_nameid.
      navigate from <CONTEXT> to <NAME> via lead selection
        lo_nd_name = wd_context->get_child_node( name = wd_this->wdctx_name ).
      navigate from <NAME> to <NAMEID> via lead selection
        lo_nd_nameid = lo_nd_name->get_child_node( name = wd_this->wdctx_nameid ).
      @TODO handle not set lead selection
        IF lo_nd_nameid IS INITIAL.
        ENDIF.
      get element via lead selection
        lo_el_nameid = lo_nd_nameid->create_element(  ).
      @TODO handle not set lead selection
        IF lo_el_nameid IS INITIAL.
        ENDIF.
      alternative access  via index
      lo_el_nameid = lo_nd_nameid->get_element( index = 1 ).
      @TODO handle non existant child
      IF lo_el_nameid IS INITIAL.
      ENDIF.
    select * from ZCARRIAGERESTRIC INTO CORRESPONDING FIELDS OF TABLE it_nameid.
      get all declared attributes
       lo_el_nameid->set_attribute(
         EXPORTING
           Value = it_nameid
           name  = 'NAMEID' ).
    lo_nd_nameid->bind_table( it_nameid ).
    but its giving dump WebDynpro Exception: The ADS call has failed.
    i have created the Node as under
    CONTEXT
    NAME (NODE)
    NAMEID (NODE)
    ZCARR (ATTRIBUTE)
    DESCR  (ATTRIBUTE)
    DESC (ATTRIBUTE)
    I tried the second method, but that too failed. while entering the INSERT WEB DYNPRO SCRIPT it gave an error 'Error while entering script'.
    Edited by: NIKHILKUMAR POOJARI on Apr 6, 2009 11:04 AM

  • [Forum FAQ]How do I add a search feature in the parameter with long drop down list?

    Introduction
    There is a scenario that thousands of values in the drop-down of a parameter. Scrolling through the large drop down list is slow and cumbersome. Is there a way that we add a search feature in the report, so that it can filter down the values in the drop
    down list to a smaller list of values?
    Solution
    To achieve this requirement, we can add a parameter with multiple keywords ahead, then all of available values which are begin with the keyword will display in the parameter list. In this scenario, we can create cascading parameters. One is a keyword parameter,
    and the other parameter is based on the keyword to display the available values.
    In order to enable the user to type multiple keywords, we can use the query below to create a split function which takes the list and the de-limiter as input parameters and splits all the values in the database:
    CREATE FUNCTION [dbo].[SplitParameterValues] (@InputString NVARCHAR(max), @SplitChar VARCHAR(5))
     RETURNS @ValuesList TABLE
     param NVARCHAR(255)
     AS
     BEGIN
     DECLARE @ListValue NVARCHAR(max)
     SET @InputString = @InputString + @SplitChar
     WHILE @InputString!= @SplitChar
     BEGIN
     SELECT @ListValue = SUBSTRING(@InputString , 1, (CHARINDEX(@SplitChar, @InputString)-1))
     IF (CHARINDEX(@SplitChar, @InputString) + len(@SplitChar))>(LEN(@InputString))
     BEGIN
     SET @InputString=@SplitChar
     END
     ELSE
     BEGIN
     SELECT @InputString = SUBSTRING(@InputString, (CHARINDEX(@SplitChar, @InputString) + len(@SplitChar)) , LEN(@InputString)-(CHARINDEX(@SplitChar, @InputString)+ len(@SplitChar)-1) )
     END
    INSERT INTO @ValuesList VALUES( @ListValue)
     END
     RETURN
     END
    Use the query below create a stored procedure to return all available values for Account parameter:
    create PROCEDURE sp (@keyword nvarchar(50))
    AS
    SELECT     AccountDescription
    FROM         DimAccount d
    inner join (SELECT [param] FROM SplitParameterValues (@keyword,',')) s on d.AccountDescription like (s.[param]+'%')
    In Report Designer, select Stored Procedure as the Query type for DataSet1, then select or type sp in the drop-down list as below:
    By default, there is a parameter named keyword in the Parameters pane.
    Add a multi-value parameter named Account in the report, then select “Get values from a query” option for Available Values as below:
    Report Design and Report Preview surface
    Report Design:
    Report Preview:
    References:
    Create User-defined Functions (Database Engine)
    Adding Cascading Parameters (SSRS)
    Applies to
    Reporting Services 2005
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hmmm. This didn't work. I even re-booted, and Firefox still doesn't show the search engine.
    It was actually an update to an earlier engine, and I foolishly removed the old version rather than just updating it.
    Is there anything elsewhere (eg. the registry) that might be preventing this?

  • How can I increase the number of Tags displayed in Drop down list?

    When I go to Bookmarks/Tags, there are only 10 tags displayed. I have created at least 15 tags.
    Is there a way to increase the number of Tags displayed in the Drop down list?
    Thanks

    Do you mean "Recent Tags" which has an icon a blue-colored folder with a primitive looking magnifying glass over the folder?
    That folder does have a limit of 10 results. If you want to create an "All Tags" item on the Boomarks Menu, you can do that by creating your own "smart folder." The process I use is a little involved, so bear with me (also, see the screen shots).
    The query used by Recent Tags is:
    place:type=6&sort=14'''&maxResults=10'''
    So for All Tags we will drop the maximum results limit:
    place:type=6&sort=14
    ''If you prefer your tags in alphabetical order instead of having the most recently used at the top, use this instead:''
    place:type=6&sort=1
    Go ahead and select the line you want and right-click > copy it.
    Next, click the bookmarks drop-down button, expand the Bookmarks Toolbar, right-click any existing item, and choose New Bookmark.
    In Location, paste the query, and in name, type All Tags (or your preferred description). When you click Add Bookmark, Firefox will add it, but it doesn't show the blue search folder icon. Drag the bookmark to the menu, and it will turn into a functioning search folder.
    Success?

  • Using a variable/drop down list in header of planning layout

    Dear all,
    I have created a simple BPS application for purely GL planning (No CO related objects like cost centre involved). I have the following characteristics in the header of the manuel planning layout.
    Business area
    Chart of accounts
    Company code
    Currency
    Currency Type
    Fiscal year
    Fiscal Year Variant
    Fiscal year/period
    Value type
    Version
    I have created variables for Business area, Fiscal Year, Fiscal Year Period, Posting Period and Version. The client wants either a variable or a drop down list for these characteristics in the header in the web application. When I assign a variable and put the characteristic in header, I get the error message in the web application saying header characteristic can only have a fixed value. Can someone tell me if it is possible and if so than how? I'll be very grateful for any inputs. Thanks a lot.
    Regards,
    Sumit

    Hi,
    When you create a variable, assign some values to the variable. These then become available in the drop down box. Ths first time a Web interface is called, these variable values are initial.As a result, u get the error messages. Select the variable values and then the error message should go away.
    Thanks,
    -NS

  • Unable to capture data from drop down list in custom added field in migo tcode at item level

    Hi guys,
    need bit help in resolving query related to custom added field in Tcode migo.
    i have added a field in migo at item level ,in this i have used drop down list
    to get data but unable to capture data from drop down list.gown through
    many blogs in scn but unable to resolve.
    Please help me out in this.
    Thanks,
    Umakant.

    Hi,
    U can use following code to fill the list box
    write this code in PBO
    In layout editor please select listbox in dropdown attribute of input field and put some fctcode attribute
    TYPE-POOLS vrm.
      DATA values TYPE vrm_values WITH HEADER LINE.
      TABLES: <ur custom Database table>.
      clear values, values[].
      SELECT * FROM <ur custom Database table>.
        values-text = <TABLE FIELD TO DISPLAY IN DROPDOWN> .
        values-key = <TABLE KEY FIELD TO DISPLAY IN DROPDOWN>.
        APPEND values.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = '<SCREEN INPUT FIELD NAME>'
          values          = values[]
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
    Also please define the following before accessing the listbox value
    data: <listbox input field name> type <table field name>,
            <inputfield name where text to display> type string  in top include
    In PAI, select the text from the table into <inputfield name where text to display>  depending on value selected which will be called when enter key is pressed or any vale is selected

  • Populate drop-down list from multiple text fields.

    Just to begin, I am brand new to this application and brand new to coding in general. Anyways, this is what I am trying to accomplish. I need to populate a drop-down list from multiple text fields. I am able to populate one item using this in the calculate event:
    TextField1.rawValue
    After I type text in TextField1 and hit enter, it displays the text in the drop-down list. I need to do this but with more than just one text field to populate more options for the drop-down list. I will also need to do something similar with populating a drop-down list from selections made in multiple other drop-down lists.
    Thanks for any help you can give me.

    Thank you for your suggestion Geo Kaiser. With that, I was able to populate my drop-down lists, but now when I select an option from the drop-down list, the selection dissapears. The selection will appear briefly in the box but then dissapears although my drop-down list options remain there. Here is the code I am using for my text field to drop-down list:
    DropDownList1.clearItems()
    DropDownList1.addItem(TextField1)
    DropDownList1.addItem(TextField2)
    And here is my code for my drop-down list to populate another drop-down list:
    DropDownList3.clearItems()
    DropDownList3.addItem(DropDownList1)
    DropDownList3.additem(DropDownList2)
    Thanks again for your help. By the way, I am using Adobe Designer 7.0.

  • Populate a drop down list with data from Excel and fill in a text field, based on drop down selectio

    Hi!
    I have a problem with a PDF form: There's a drop down list that I populate with Excel data that I've put in an XML file through an XSD file -- no problem here. The drop down list has a data binding to the XML file, so that a choice in the drop down list can be associated with an object in the XML file. So, when I make a choice in the drop down list, a corresponding object value is fetched from the XML file and put in a text field on the form.
    How to do this is described by Stefan Cameron here:
    http://forms.stefcameron.com/2006/07/29/dynamic-properties/
    There's a snag, though, and to describe it more clearly:
    The XML file contains three types of objects: role, role number, and role cost center. Of these I use the first and the third, i.e. the role and the role cost center. The drop down list contains the roles, and when I select a role, the corresponding cost center is filled out in the text field. So far, so good!
    But -- if the cost center has the same value for two or more roles, all of these roles "bounce back" into the drop down list, that is, they are all selected in the drop down list. How many of these you can see depend on the height of the drop down list -- if it's low you'll only see the first one.
    If I modify Stefan Cameron's data in his example I get the same behavior, so the problem seems to have to do with how XML data are fetched.
    I'm sure there's a workaround, but I can't find it! I've spent many hours browsing the web without finding anyone with a similar problem.
    Any suggestions appreciated!

    Although your issue is far beyond mine, I was hoping you can help me out.....
    I need to create a drop down list of names which I wish to somehow link to an Excel spreadsheet.
    Please let me know the steps I need to do.  I've tried several things, but nothing seems to work and I'm not sure what I am doing wrong.
    Thank you

  • How to get Date value from database and display them in a drop down list?

    Hello.
    In my Customers table, I have a column with Date data type. I want to create a form in JSP, where visitors can filter Customers list by year and month.
    All I know is this piece of SQL that is convert the date to the dd-mm-yyyy format:
    SELECT TO_CHAR(reg_date,'dd-mm-yyyy') from CustomersAny ideas of how this filtering possible? In my effort not to sound like a newbie wanting to be spoonfed, you can provide me link to external notes and resources, I'll really appreciate it.
    Thanks,
    Rightbrainer.

    Hi
    What part is your biggest problem?? I am not experienced in getting data out of a database, but the way to get a variable amount of data to show in a drop down menu, i have just messed around with for some time and heres how i solved it... In my app, what i needed was, a initial empty drop down list, and then using input from a text-field, users could add elements to a Vector that was passed to a JComboBox. Heres how.
    package jcombobox;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.swing.*;
    public class Main extends JApplet implements ActionListener {
        private Vector<SomeClass> list = new Vector<SomeClass>();
        private JComboBox dropDownList = new JComboBox(list);
        private JButton addButton = new JButton("add");
        private JButton remove = new JButton("remove");
        private JTextField input = new JTextField(10);
        private JPanel buttons = new JPanel();
        public Main() {
            addButton.addActionListener(this);
            remove.addActionListener(this);
            input.addActionListener(this);
            buttons.setLayout(new FlowLayout());
            buttons.add(addButton);
            buttons.add(remove);
            add(dropDownList, "North");
            add(input, "Center");
            add(buttons, "South");
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == addButton) {
                list.addElement(new SomeClass(input.getText()));
                input.setText("");
            } else if (e.getSource() == remove) {
                int selected = dropDownList.getSelectedIndex();
                dropDownList.removeItemAt(selected);
        public void init(String[] args) {
            setSize(400,300);
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(new Main());
    }And that "SomeClass" is show here
    package jcombobox;
    public class SomeClass {
        private String text;
        public SomeClass(String input) {
            text = input;
        public String toString() {
            return text;
    }One of the things i struggled a lot with was to get the dropdown menu to show some usefull result. If the list just contains class references it will show the memory code that points to that class. Thats where the toString cones in handy. But it took me some time to figure that one out, a laugh here is welcome as it should have been obvious :-)
    When the app is as simple as this one, using a <String> vector would have been easier, but this is just to demonstrate how to place classes in a vector and get some usefull info out of it, hope this answered some of your question :-)
    The layout might have been easier to write, than using the toppanel created by the JApplet and then the two additional JPanels, but it was just a small app brewed together in 15 minutes. Please comments on my faults, so that i can learn of it.
    If you need any of the code specified more, please let me know. Ill be glad to,

  • How do I delete a site from appearing in my address bar drop-down list?

    I am looking for a way to delete a website from being included in the drop-down list when I type things into my address bar.
    I've deleted history and cookies associated but to no avail.
    I'm accessing my router; I type 192... and it brings up the link to my old router, which doesn't work. Getting annoyed at having to scroll down to get the new, real link.
    Solution? Cheers.

    Thanks!

  • How to make default value in a drop down list

    Hi,
          I have created a drop down list using Selection-Screen code. I have three values in it. I would like to make one of the option as a default value. How to achieve it?
    I am working on module pool program. I have few screens as a part of my program. I have created print button on tool bar of one screen but that print button is appearing on the other screens too. How to avoid it?
    Help would be appreciated...
    Thanks
    Edited by: mohammed ibrahim on Oct 10, 2008 8:43 PM

    1) let drop down box be g_dd.
      if g_dd is initial.
      g_dd = option2.
      endif.
    2)
    by default same pf-status is used by all the screens in the same program
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status 'abc' excluding 'fcode_of_button'
    endif.
    or
    data: git_fcode type sy-ucomm with header line.
    git_fcode = 'fcode_of_button'.
    append git_fcode.
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status excluding git_fcode
    endif.
    Edited by: Amit Gupta on Oct 11, 2008 11:36 AM

  • Fill-In-The-Blank drop-down list in HTML5 output

    I'm working in Captivate 7 (WIN) and developing for both SWF and HTML5 output, viewing courses in IE9 for Windows and Safari on iPad.
    I have a quiz containing a fill-in-the-blank question, using a drop-down list to select the correct answer, however it does not display the drop-down button or function correctly in HTML5 output (see screenshot).
    The issue began after updating to Captivate 7 version 7.0.1.237. The drop-down list worked prior to the update I installed recently. I'm viewing the published course locally and in the LMS, and it does not work in either.
    I've not read in the help documents that drop-down list questions are an unsupported question type in HTML5, and so I'm wondering if this is a bug that needs to be reported. Has anyone encountered this issue?

    Do you need scoring? There is a Scrolling Text interaction (more control, you can empty the variable and it will be displayed empty) but it is a non-interactive one, no score possible except by adding other interactive objects.
    Custom Short Answer Question - Captivate blog

  • Is it possible to show first item in a Drop down list

    Is it possible to automatically display the first item in a drop down list ?
    The reason I ask is  ... I am generating pre-filled PDF forms using XML data files.
    Whenever there is a certain type of data I am populating a drop down list for the user to review.
    Currently, the user must click on the drop down to see if data is there regardless of whether there is no data at all or many data lines of data..
    I would like to make it clear to the user whether or not there is any data - right awa.y
    I have considered creating a display item next (like a check box or a text field ) next to the drop down and setting it to cindicate if there is data, etc -
    but i thougth that I would ask if the drop down could simply be set to automatically display the first item in the list (this is the preferred functionality)
    If this is not possible I can always create a check box and set it if there is any data as an  indicator for the user ..
    Thanks

    You can do this way..
    Place the code in Inititalize event with Java Script
    if(DropDownList1.rawValue == null)
        DropDownList1.selectedIndex = 0;
    You need to check if the Dropdown has a value selected from the previous save.. If not then set the selected item to 0th index. (which is 1st one in the dropdown values)..
    Thanks
    Srini

Maybe you are looking for

  • Process chain is long running

    We have a process chain that is long running even though there is not much data. It is long running in Load PSA step. It is getting data from other R/3 sap system. A job is also long running in the R/3 system. We can see data coming to BW system but

  • How can I import my old iPhoto library into my new version of iPhoto?

    Just purchased new iMac and am trying to import my old iPhoto library, but keep getting Unreadable Files message. I have the library file and see that it shows up as an iPhoto Library under the Kind column.

  • FaceTime never works on the first attempt

    I'm surprised I don't see anything mentioned on these forums yet, because I know more people that have these problems: Whenever I try to call via FaceTime, and the other person answers, the call get's stuck in the "Connection-" state for minutes. The

  • SimpleDateFormat.parse() causes Unparsable date exception

    I am using SimpleDateFormat to both format and parse date strings. The format is working properly, but parse results in the following exception: java.text.ParseException: Unparseable date: "2007-08-31T12:05:05.651-0700" at java.text.DateFormat.parse(

  • Error when trying to apply Weblogic 8.1 SP5

    Hi There, i have an issue upgrading from WL81 SP3 to SP5/SP6 while doing that,WLS_install.log gives out an error: 2008-08-22 11:50:00,619 FATAL [readSilentXML] com.bea.plateng.wizard.installer.common.parsers.TemplateParser - Got an error in parsing t