Loading ...
Sorry, an error occurred while loading the content.

Autocomplete - change datasource

Expand Messages
  • matthiasm3112
    Hi, I m using the autocomplete control in the search suggest script by Eric Miraglia. I
    Message 1 of 1 , Jul 29, 2009

      I'm using the autocomplete control in the search suggest script  by Eric Miraglia. I added 2 radio buttons to the search form and I want to change the datasource (or one of the URL parameters) if the user clicks on a radio button. I wonder how I might do this?

      Could anyone help? Any idea?


      Here's part of the code:
          this.oDataSource = new YAHOO.widget.DS_ScriptNode("http://url.com?param=1", ["ResultSet.Result","Title","Url","ClickUrl"]);

          this.oAutoComp = new YAHOO.widget.AutoComplete(
              "searchinput", // the input field's ID
              "searchcontainer", // the suggestion container's ID
              this.oDataSource, // the DataSource
              {  [...]

           YAHOO.util.Event.on("radio1", "click", function(e) {
             // I would like to change  the value of param to format
              format = YAHOO.util.Dom.get('radio1').value;

    Your message has been successfully submitted and would be delivered to recipients shortly.