Spry Auto Suggest

Good  Morning friends,
I have a problem in  the spry auto suggest, I am not able to select a list item with the  mouse when you press the textfield field, as I do I select an item when I  click the mouse? has some property that is missing? the spry autosuggest ja normal loads the data follows  the code below, thank you
var dsLocal = new Spry.Data.JSONDataSet("http://<?php echo $_SERVER['SERVER_NAME']; ?>/siscco/dados/localocorrencia.php",{sortOnLoad:"local_oco"});
    <div id="procuraLocal" style="float:left;">
                       Address: 
    <input autocomplete="on" id="local_oco" name="local_oco" type="text" size="45" tabindex="1" />  
<div id="resultLocal" spry:region="dsLocal" style="width:100%;z-index:100;">
         <div spry:repeat="dsLocal" spry:suggest="{local_oco}"><b>{local_oco}</b></div>
  </div>
var localocorrencias = new Spry.Widget.AutoSuggest("procuraLocal","resultLocal","dsLocal",'local_oco',{containsStrin g:true,minCharsType:2});

I have never used the Spry Auto Suggest feature, so I cannot guarantee my answer.
Looking at your code
var dsLocal = new Spry.Data.JSONDataSet("http://<?php echo $_SERVER['SERVER_NAME']; ?>/siscco/dados/localocorrencia.php",{sortOnLoad:"local_oco"}); 
    <div id="procuraLocal" style="float:left;">
                       Address:
    <input autocomplete="on" id="local_oco" name="local_oco" type="text" size="45" tabindex="1" /> 
<div id="resultLocal" spry:region="dsLocal" style="width:100%;z-index:100;">
         <div spry:repeat="dsLocal" spry:suggest="{local_oco}"><b>{local_oco}</b></div>
  </div>
var localocorrencias = new Spry.Widget.AutoSuggest("procuraLocal","resultLocal","dsLocal",'local_oco',{con tainsString:true,minCharsType:2});
apart from learning how to incorporate PHP into a JavaScript code as well as the INPUT autocomplete attribute, I noticed that you do not have a FORM surrounding the INPUT element as in
<div id="procuraLocal" style="float:left;">
  Address:
  <form method="get" action="">
    <input autocomplete="on" id="local_oco" name="local_oco" type="text" size="45" tabindex="1" />
    <div id="resultLocal" spry:region="dsLocal" style="width:100%;z-index:100;">
      <div spry:repeat="dsLocal" spry:suggest="{local_oco}"><b>{local_oco}</b></div>
    </div>      
  </form>
</div>
I hope this helps.
Ben

Similar Messages

  • Spry Auto Suggest Widget Sample: Change scrollbar?

    Is it possible to change the scrollbars to scomething a bit more asthetically pleasing?
    I know this can be done with the Prototype framework:
    http://livepipe.net/control/scrollbar
    If not, can the scrollbar be removed completely?  I never show more than 10 results anyway.

    htcilt wrote:
    Is it possible to change the scrollbars to scomething a bit more asthetically pleasing?
    I know this can be done with the Prototype framework:
    http://livepipe.net/control/scrollbar
    If not, can the scrollbar be removed completely?  I never show more than 10 results anyway.
    Yes it is possible to change the scrollbars; but you do not need Spry to do this. You can use the Prototype framework if you wish.
    You can also remove the scrollbar completely, although this is only needed for IE as other browsers do not place a scrollbar if this is not needed.
    My advice, leave the browser scrollbar as it is. Users are used to it and my experience is that a site has to be functional before asthetical.
    I hope this helps.
    Ben

  • Dynamically loaded data in Auto Suggest

    I'm loading data from the server with PHP for the AutoSuggest
    Widget. Everything works great (and fast!).
    Is there a way to add an additional URL parameter to the one
    that is created for the AutoSuggest Widget (by default "prd")?
    It obviously won't work when I add the URL parameter to the
    data set constructor because it conflicts with the URL parameter
    that is created by the Auto Suggest Widget's urlParam.
    In other words, this wouldn't work:
    new
    Spry.Data.XMLDataSet("products.php?id=23,"products/product");
    I tried to add it to the urlParam in the AutoSuggest
    constructor script below the markup:
    urlParam: "id=23&amp;prd"
    I was hoping that the above would create the following URL
    parameter sting:
    ?id=23&amp;prd=e (assuming that the first typed letter
    would be "e")
    since prd alone produces
    ?prd=e
    But that doesn't seem to work either. Do you have any
    suggestions?
    Thanks!

    Update:
    I just found the solution:
    It works when I'm not using the entity name but the actual
    ampersand "&" in the URL parameter like this:
    urlParam: "id=23&prd"
    Obviously, I also have to set loadFromServer to 'true' to
    correctly filter the record set (I forgot that at first).
    Thanks for the great widget!

  • Using Auto Suggest To Set The Value Of Multipe Form Fields

    I would like to use the Spry 1.5 Preview Auto Suggest widget
    to provide the value for multiple form fields based on the row the
    user selects in the auto suggestion data set. I've placed an
    example of what I want to do here:
    http://www.brucephillips.name/spry/Spry_P1_5_Preview/autosuggest/autosuggestMultipleFields .cfm
    It appears that when the user clicks on one of the rows in
    the auto suggestion data set, the current row for the data set is
    not updated but remains the default (first row in the data set).
    Therefore, if you have a spry:detailregion that uses that data set,
    the values for that detail region are from the first row in the
    data set and not the row the user selected.
    Is it possible to set the current row of the auto suggest
    data set to the row the user clicked on in the auto suggestion data
    set so that the spry:detailregion will have the values from the row
    the user clicked on?
    I had previously modified the Spry 1.4 Auto Suggest widget to
    do this. See:
    http://www.brucephillips.name/blog/index.cfm/2006/11/6/Modifing-Sprys-Auto-Suggest-Widget- to-Bind-Users-Selection-to-A-Form
    Thank you for any assistance.

    Cristian: thank you for the reply. I understand your concern
    about the user changing the auto suggest field after updating the
    complimentary fields. I think that could be handled through user
    instruction. Additionally, instead of using form fields to hold the
    complimentary data I could use non-editable paragraphs.
    I hope the change is not too difficult. I think this
    modification would make the auto suggest widget even more useful.
    For example think about a product auto suggest. User starts to type
    in the name of the product, selects the full product name from the
    auto suggestions, and now the page can immediately show in a
    spry:detailregion all the product details.
    Thanks again for considering my request. I really appreciate
    all the work the Spry team is doing. I'm looking forward to the
    official release of Spry.

  • Auto Suggest Special characters

    Hi!
    I would like to known if you can use the Auto suggest widget
    from the Spry framework with special character typed in the text
    box.
    In JSONDataSet with loadFromServer:true contains information
    with special characters and spry:region appear correctly, but when
    i type "Etc fóo" the spry url is ...?parameter=Etc%20f%C3%B3o
    but server side value of parameter=Etc fóo,
    when i send form url ?parameter=Etc+f%F3o server side value
    of parameter is Etc fóo.
    I try with charset ISO-8859-1, UTF-8 and i can´t fix
    this.
    The same error when i type "É" spry url
    ...?parameter=%C3%89 and server side value of parameter is Ã?,
    when i sent form url is ..?parameter=%C9 and i´ts works,
    server side is É
    Version Spry_1_6_1_022408
    same problem
    Auto
    suggest with special characters
    Changes for Spry 1.6.1 - 2008/02/23
    Auto Suggest
    Fixed a bug for dynamic URL loading where some special
    characters like + and & where not sent correctly to the server.
    Fixed a bug with suggestion list showing when pressing some
    special characters

    Hello,
    I must admit that we didn't include into our test matrix such
    a scenario so I don't know the answer. However I would like to
    clear me a question before starting the investigation.
    Do you mean that if you type the 'a' character the widget
    should display the values that also starts with "â" or
    "à" ? Because this scenario is really not supported.
    Cristian

  • How to implement Auto Suggest Widget

    Hi there
    I have a dynamic asp classic page, where the data come from an access db.
    On this page, many documents (category and title ) are displayed for download.
    I want to implement Auto Suggest Widget in order to find the document easier and to jump to it (href="#document_xy") directly for download.
    I don't have a clue on how to implement the Auto Suggest Widget.
    The ASP sample works with XML File.
    http://labs.adobe.com/technologies/spry/samples/autosuggest/SuggestSample.html
    All replies, hints, tutorials are highly appreciated.
    kind regards
    joey00x
    I am using Win XP, Dreamweaver CS3

    Hi,
    thanks for trying to help.
    I am sorry to ask again. I am not at all familiar with xml.
    I have tried to modify the ASP script you've suggested, but I get strange XML error, which doesn't make sense to me.
    I understand that with the script the server creates an XML File on the fly. First I have to connect to my access database, then I fill the records into a recordset object. And then the server loops through the RS and creates the xml file. Is that correct?
    The error message I get, points to a complete different place in the code, to a javascript module, which is working perfectly without below code.
    Any suggestions where the bug is?
    Thanks for your time
    kind regards
    joey00x
    Here the code that I am using:
    <%
    Dim objRS
    Dim SQLxml
    SQLxml = "Select category, subcategory, title from DocumentView"
    Set objRS=Server.CreateObject("ADODB.Recordset")
    objRS.Open SQLxml , objConn, 0, 1
    ' Send the headers
    Response.ContentType = "text/xml"
    Response.AddHeader "Pragma", "public"
    Response.AddHeader "Cache-control", "private"
    Response.AddHeader "Expires", "-1"
    %>
    <?xml version="1.0" encoding="utf-8"?>
    <root>
      <% While (NOT objRS.EOF) %>
        <row>
             <%
                For each field in objRS.Fields
                column = field.name
             %>
            <<%=column%>><![CDATA[<%=(objRS.Fields.Item(column).Value)%>]]></<%=column%>>
            <%
                Next
            %>
        </row>
        <%
          objRS.MoveNext()
        Wend
        %>
    </root>
    <%
    objRS.Close()
    Set objRS = Nothing
    %>

  • Enter Key doesn't activate auto-suggest link

    Arrowing to an item in the auto suggest menu and pressing
    enter doesn't take me to take me to the page linked. I am able to
    arrow down, and if I click on it with my cursor the link functions
    (even though these links are just to invalid files).
    Any ideas? I'm using an list method.
    http://www.mtidry.com/dev2008/about/

    True, it isn't structured as a 'jump menu', but everywhere
    else I've seen it, including on the
    http://labs.adobe.com/technologies/spry/samples/autosuggest/SuggestSample.html
    page it functions like a jump menu would (no link to follow, but
    the menu reacts when the user arrows down to an item and hits
    enter). Even on the search bar on the upper right corner of this
    site, which doesn't appear to call the exact same scripts, but
    similar ones, functions as a jump menu. The documentation for this
    widget includes instructions on keyboard navigation. I can't
    imagine that the widget would be designed so that the user could
    highlight the item with the keyboard but be unable to follow the
    link unless he or she also clicked on it with the mouse. Sort of
    goes against the idea of keyboard navigation.
    What I perceive to be the problem with mine is that the Divs
    are being selected when the user arrows down, not the links. In a
    web page I can tab from one link to the next, and use the enter key
    to follow the link. Any other suggestions?

  • Auto Suggest with multiple fields?

    Hello,
    I am planning on using the autosuggest on a project I'm
    working on, and was surprised by the lack of support for multiple
    fields. Correct me if I'm wrong, but right now you can only search
    for the 'name' field or 'age' etc. I would like to be able to enter
    some text in the textinput field, and it would search both 'name'
    and 'username' in the dataset. Is this possible with the current
    widget?
    Thanks,
    Maquelly

    Hello Maquelly,
    Indeed the Auto Suggest widget do not support filtering the
    data against multiple fields simultaneously if the data is filtered
    on the client side. I will add this as an enhancement request for
    this brand new widget. We have only support for multiple fields to
    be displayed in the suggestion list which is a spry:region, you can
    insert the values of multiple fields concatenated through the
    spryLsuggest tag buy we are not able to check multiple fields,
    We have implemented also the ability to send the value typed
    on the server and expect a new XML with the filtered data. This
    method allow you to achieve your goak as you can control
    completelly the filtering algorithm that sends the data back in
    browser. We have some samples in the Spry 1.5 preview.
    Regards,
    Cristian MARIN

  • CSS (?) Problem in Auto-Suggest Widget

    I probably missed something simple in the CSS, but I cannot
    get auto-suggest's inner DIV to adjust the width of the suggestion
    results. What I tried is setting the inner DIV so:
    <div class="list" spry:repeat="dsPlaylist"
    spry:suggest="{SONG_TITLE}" spry:setrow="dsPlaylist">
    And then, in CSS I've got:
    .list {
    background-color: #66FF00;
    width: 300px;
    Background-color works, but width does not.
    Can anyone clue me in to what I've missed? Thanks!
    Jeremy

    This isn't intuitive, but in the default style sheet, the
    .hideSuggestClass
    has a width set. This is controlling the width of the
    container. changing or editing this value will allow your width
    property to work as expected.
    Hope this helps.
    Don

  • Auto suggest behaviour copononent is not working

    Hi All,
    We migrated our application from JDev 11.1.1.3 to 11.1.1.5.
    we have a input text with LOV feild in a popup, and the feild has auto suggest behavior,
    <af:inputListOfValues id="inputListOfValues3"
    popupTitle="Search and Select: #{bindings.Dica.hints.label}"
    value="#{bindings.Dica.inputValue}"
    label="#{bindings.Dica.hints.label}"
    model="#{bindings.Dica.listOfValuesModel}"
    required="#{bindings.Dica.hints.mandatory}"
    columns="30"
    shortDesc="#{bindings.Dica.hints.tooltip}"
    autoSubmit="true"
    valueChangeListener="#{backingBeanScope.Bean.dIcaChangeListener}"
    searchDesc=" ">
    <f:validator binding="#{bindings.Dica.validator}"/>
    <af:autoSuggestBehavior suggestedItems="#{bindings.Dica.suggestedItems}"/>
    </af:inputListOfValues>
    it worked well in 11.1.1.3, but after moving it to 11.1.1.5, the auto suggest behaviour stopped working, but found no error in the log. LOV is working good, Value change listener is also working well.
    Please advise.
    Thanks...

    Yes, I did that, but no result. we have similar components in the same page itself with auto suggest behaviour and input LOV, for those auto suggest behaviour is working good. But this particular feild is in a popup, that might be the reason.

  • Auto suggestion in outlook 2010

    Hi,
    As i type in outlook 2010, the word suggestions need to be shown to select then and there( as similar to mobile; when we compose a message by making dictionary ON).
    Please suggest me.
    Thanks,
    VidhyaShankar

    Hi,
    By word suggestions/auto suggestions, do you mean the feature that prompt with suggested words when we type the first few letters? If this is the case, I'm afraid there is no such feature in Outlook.
    If I've misunderstood it, would please provide a screenshot regarding this feature on the mobile so that we can understand it more clearly? You can share the screenshot to us by sending it to
    GBSD TN Office Information Collection [email protected]
    The email subject should be the thread link.
    Thanks,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Need to implement auto suggest with multiple select in a input text field

    Hi,
    Jdev Ver: 11.1.1.4
    My requirement is to create an input field where i can provide auto suggest and user can enter multiple email ids. It is similar to current "To" field while composing a mail in Gmail.
    Problem:
    I have implemented input box with auto suggest. For the first entry it works fine. when i enter 2nd value(i have used ',' (comma) as separator and handled it in 'suggestItems' bean method to take sub-string after comma for providing the suggestion) , after selection.... the first value get lost. So at a time only one value is selected in the input text.
    Input text:
    <af:inputText label="Names" id="it21" rows="2"
    columns="50" simple="true"
    valueChangeListener="#{VisitBackingBean.visitMembersInputBoxCL}"
    binding="#{VisitBackingBean.visitMembersInputBox}">
    <af:autoSuggestBehavior suggestItems="#{VisitBackingBean.onSuggest}"/>
    </af:inputText>
    Bean Method:
    public List onSuggest(FacesContext facesContext,
    AutoSuggestUIHints autoSuggestUIHints) {
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    String inputNamevalue = autoSuggestUIHints.getSubmittedValue().trim();
    if(inputNamevalue.contains(",")) {
    inputNamevalue = inputNamevalue.substring(inputNamevalue.lastIndexOf(",")+1).trim();
    //create suggestion list
    List<SelectItem> items = new ArrayList<SelectItem>();
    // if (autoSuggestUIHints.getSubmittedValue().length() > 3) {
    OperationBinding setVariable =
    (OperationBinding)bindings.get("setnameSearch");
    setVariable.getParamsMap().put("value",
    inputNamevalue);
    setVariable.execute();
    //the data in the suggest list is queried by a tree binding.
    JUCtrlHierBinding hierBinding =
    (JUCtrlHierBinding)bindings.get("AutoSuggestName_TUserROView1");
    //re-query the list based on the new bind variable values
    hierBinding.executeQuery();
    //The rangeSet, the list of queries entries, is of type //JUCtrlValueBndingRef.
    List<JUCtrlValueBindingRef> displayDataList =
    hierBinding.getRangeSet();
    for (JUCtrlValueBindingRef displayData : displayDataList) {
    Row rw = displayData.getRow();
    //populate the SelectItem list
    items.add(new SelectItem(rw.getAttribute("UsrUserName").toString().trim() +
    "<" +
    rw.getAttribute("UsrMailId").toString().trim() +
    ">",
    rw.getAttribute("UsrUserName").toString().trim() +
    "<" +
    rw.getAttribute("UsrMailId").toString().trim() +
    ">"));
    return items;
    Please suggest how can i achieve the mentioned functionality.

    Hi,
    doesn't work this way as the suggest list returns a single value. You can actually use the existing values as a prefix to the new value in which case the suggest list would look a bit odd. Beside of this all you can do is to create a user lookup field with auto suggest and once a name is selected, update another field with the value returned from this action
    Frank

  • Ajax auto-suggest with adf

    Hi..
    I am trying to implement ajax auto-suggest using the example @ http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html
    After trying it, i realised the auto-suggest component does not work in firefox, but only in IE. Also when using IE 7, the auto-suggest pop up.screen. does not display directly under the textbox.. but rather away from it..unlike what we see in the example.
    Is there any other ways to implement autosuggest that work in both firefox and IE using ADF?
    thanks

    The limitation on browsers is a function of the ajax library used, namely https://blueprints.dev.java.net/bpcatalog/distDrops.html, not ADF. I would suggest finding a similar library that supports the browsers you wish to use.
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem using Auto Suggest Behavior

    Hi all,
    I am using Jdeveloper 11.1.1.2 and ADFBC.
    I want to implement auto suggest behavior and I am following the steps on: http://www.oracle.com/technology/products/jdev/howtos/autosuggest/explaining_autosuggestbehavior.htm
    When I am writing a partial string on the component I don't show auto suggestion and if I click on the button on the right of the component (the lens for finding records) I see a panel search with all the fields of my VO.
    It is a normal behavior I have a warning in the auto suggest component when I write #{bindings.myField.suggestedItems}?? I don't find it under bindings using the expression builder.
    Where am I wrong?Any suggestions?
    Thank you
    Andrea

    Sorry,
    after the tag validator I have:
    <af:autoSuggestBehavior suggestedItems="#{bindings.myAttribute.suggestedItems}"/>
    When I am writing something on the inputText of myAttribute I have this error:
    Target Unreachable, 'DescrizioneTecnica' returned null.
    Stack trace:
    javax.el.PropertyNotFoundException: Target Unreachable, 'myAttribute' returned null
         at com.sun.el.parser.AstValue.getTarget(AstValue.java:88)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:153)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at oracle.adfinternal.view.faces.el.InternalELObject.autoSuggest(InternalELObject.java:134)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

  • Auto-Suggest feature in Combo-box LOV is not displaying non-unique values

    Hi,
    I have an auto-suggest feature implementation on a combo-box lov that displays the name and email-id of a list of people. There are non-unique names in the back-end, for example :
    Abraham Mason [email protected]
    Abraham Mason [email protected]
    But when I use the auto-suggest feature and type in, say 'Ab', instead of showing both the Abraham Masons the auto-suggest displays only one of the values.
    As in the example above the email-ids of the two Abraham Masons are different and unique.
    If I use the conventional drop down menu of the combo-box then both the values are visible.
    Is the auto-suggest feature implemented in a manner so as to display only unique values?
    This is the implementation of the auto-suggest feature that I have done -
    <af:column headerText="#{bindings.RqmtAtLevel1.hints.Owner.label}"
    id="c23" sortable="true" filterable="true"
    sortProperty="Owner"
    filterFeatures="caseInsensitive">
    <af:inputComboboxListOfValues id="ownerId"
    popupTitle="#{ResourcesGenBundle['Header.SearchandSelect.Searchandselectanobjectusingad']}: #{bindings.RqmtAtLevel1.hints.Owner.label}"
    value="#{row.bindings.Owner.inputValue}"
    model="#{row.bindings.Owner.listOfValuesModel}"
    required="#{bindings.RqmtAtLevel1.hints.Owner.mandatory}"
    columns="#{bindings.RqmtAtLevel1.hints.Owner.displayWidth}"
    shortDesc="#{bindings.RqmtAtLevel1.hints.Owner.tooltip}"
    autoSubmit="true">
    <f:validator binding="#{row.bindings.Owner.validator}"/>
    <af:autoSuggestBehavior suggestedItems="#{row.bindings.Owner.suggestedItems}"/>
    </af:inputComboboxListOfValues>
    </af:column>
    Thanks,
    Anirudh Acharya

    Hi,
    don't find a bug entry about this, so if this indeed is a defect then this has not been filed. Do you have a test case ? If you have please zip it up and send it in a mail to me. My mail address is in my OTN profile (just click on my name until you get to the profile). Pleas rename the "zip" extension to "unzip" and mention the JDeveloper release you work with. The test case should work against the Oracle HR schema.
    If you need to track the issue, I suggest to file a service request with customer support yourself
    Frank

Maybe you are looking for

  • Trying to subtract a complex path from another, can't get the result I need

    I'd really appreciate some help on this. I'm not familiar with illustrator and am stuck trying to accomplish what I hope is an easy task. I've uploaded my .ai here just in case anyone can help. I have two layers, one is a collection of lines/paths wh

  • Snow Leopard 10.6.3 freezing during installation? Please help!

    I have a 13" Macbook with Mac OS X 10.4.11 and am trying to install Snow Leopard 10.6.3 (which I bought from the Apple store).  I am having trouble with the installation, as it freezes every time I get to a certain point in the "Installing" screen. I

  • App License - I am lost, any help?

    Hello, I am trying to get developer license for payed apps. But I got really lost now... So I got to point where I had to send fax. I sent it. I got no answer for a week, so I discovered contract page on ItunesConnect, where I applied for payed apps,

  • Need Info on sysidtools and /etc/.sysIDtool.state

    I am trying to locate someone or some document that can explain how sysidnet, sysidsys, and the associated tools behave, as well as the /etc/.sysIDtool.state file that controls them. In particular, what, specifically, does each line in /etc/.sysIDtoo

  • [Solved?]ATI Power Consumption

    Hi all, I've recently installed ArchLinux (64 Bit) to my Asus K52JK (GPU Model: ATI Radeon HD5145).  On other distros I wd usually install the proprietary ATI drivers, but on Arch as recommended by the wiki I've installed the open source version. Now