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

autocomplete, browser issues? IE/Safari

Expand Messages
  • Dan Levine
    Thank you for releasing this suite of tools. I picked Autocomplete as a feature to try out and see how quickly and easily it came together. The short answer
    Message 1 of 9 , May 24, 2006
    • 0 Attachment
      Thank you for releasing this suite of tools. I picked Autocomplete as
      a feature to try out and see how quickly and easily it came together.
      The short answer is: it almost all came together great, but when it
      got stuck I wasn't sure how to debug. (CSS/DHTML debugging is
      difficult enough when you write the source yourself!) So I'll post
      here and see if maybe someone else has had this issue.

      It works fine on Firefox 1.5, but not on IE or Safari. The ajax call
      *does* ping the server correctly, and recieve back correct results.
      But from there I get no browser display except on Firefox.

      Any thoughts, or any recommendations for how to debug this type of
      issue within the yahoo framework?

      client code snips below for my tagging widgets below.

      FORM:

      <form method="POST" action="/addTag.htm?obj_id=${object.id}">
      <div id="searchdiv">
      <input type="text" id="keywordInput" name="keyword" class="textBox">
      <div id="searchshadow"><div id="searchContainer"></div></div>
      </div>
      <input type="submit" class="submitBut" value="add tag">
      </form>

      JS includes + CSS styles:

      <%-- put this at the bottom of the page above the footer for the page
      where the autocomplete lives --%>
      <style type="text/css">
      #searchdiv {position:relative; width: 200px;} /* set width of
      widget here*/
      #keywordInput {position:relative;}
      #searchContainer
      {position:relative;bottom:2px;right:2px;border:1px solid
      #999999;background:#FFFFFF;font-size:13px; color: #666666;
      overflow:hidden;display:none;}
      #searchContainer ul {position:relative; margin: 0px;
      width:200px;padding: 0px;list-style:none;}
      #searchContainer li
      {padding:2px;cursor:default;white-space:nowrap;display:list-item;color:#666666}
      #searchContainer li.highlight {background:#316ac5; color:#FFFFFF}
      #searchshadow
      {position:absolute;width:100%;margin:2px;z-index:5;background:#cecece;}
      </style>
      <!-- Dependencies -->
      <script src="/js/yui/build/yahoo/yahoo.js"></script>
      <script src="/js/yui/build/dom/dom.js"></script>
      <script src="/js/yui/build/event/event.js"></script>
      <script src="/js/yui/build/connection/connection.js"></script>
      <script src="/js/yui/build/animation/animation.js"></script>
      <script src="/js/yui/build/autocomplete/autocomplete-min.js"></script>
      <!-- -->


      MY JS for YAHOO OBJECTS:


      // An XHR DataSource
      var myServer = "/tagQuery.htm";
      var mySchema = ["ResultSet.Result","keyword"]; //["?", "|"];
      //["ResultItem", "KeyDataField"];
      var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);


      // Increase the cache size
      //myDataSource.maxCacheEntries = 60

      // Match case sensitivity
      myDataSource.queryMatchCase = false;

      // Match results that *contain* the query string as well as results
      that start with query string
      myDataSource.queryMatchContains = false;

      // Match results of query strings that are *subsets* of the current
      query string
      // myDataSource.queryMatchSubset = true;

      // Will now send http://url?key=foo
      myDataSource.scriptQueryParam = "key";

      YAHOO.widget.AutoComplete.prototype.formatResult =
      function(aResultItem, sQuery) {
      var sResult = aResultItem[0];
      if(sResult) {
      return sResult;
      }
      else {
      return "";
      }
      };
      var myAutoComp = new
      YAHOO.widget.AutoComplete('keywordInput','searchContainer', myDataSource);
      // comas may delimited queries...
      myAutoComp.delimChar = ",";
      // Require user to type at least 1 characters before triggering a query
      myAutoComp.minQueryLength = 1;
      // Container will expand and collapse vertically
      myAutoComp.animVert = false;
      // Container will expand and collapse horizontally
      myAutoComp.animHoriz = false;
    • ticklishturtletoe
      I always debug JavaScript by inserting alerts throughout the area of code I suspect. I m having the same success/failure with AutoComplete in FireFox/Safari,
      Message 2 of 9 , May 25, 2006
      • 0 Attachment
        I always debug JavaScript by inserting alerts throughout the area of
        code I suspect.

        I'm having the same success/failure with AutoComplete in
        FireFox/Safari, respectively.

        I love Apple to death. I'm working on my Powerbook now. But I think
        they must have their junior programmers working on Safari. (Why does
        Apple need to make a browser anyway?)

        When you say IE, I hope you don't mean IE on the Mac. If so, forget
        about it. Nobody uses it.

        Cheers!
        TTT

        --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@...> wrote:
        >
        > Thank you for releasing this suite of tools. I picked Autocomplete as
        > a feature to try out and see how quickly and easily it came together.
        > The short answer is: it almost all came together great, but when it
        > got stuck I wasn't sure how to debug. (CSS/DHTML debugging is
        > difficult enough when you write the source yourself!) So I'll post
        > here and see if maybe someone else has had this issue.
        >
        > It works fine on Firefox 1.5, but not on IE or Safari. The ajax call
        > *does* ping the server correctly, and recieve back correct results.
        > But from there I get no browser display except on Firefox.
        >
        > Any thoughts, or any recommendations for how to debug this type of
        > issue within the yahoo framework?
        >
        > client code snips below for my tagging widgets below.
        >
        > FORM:
        >
        > <form method="POST" action="/addTag.htm?obj_id=${object.id}">
        > <div id="searchdiv">
        > <input type="text" id="keywordInput" name="keyword" class="textBox">
        > <div id="searchshadow"><div id="searchContainer"></div></div>
        > </div>
        > <input type="submit" class="submitBut" value="add tag">
        > </form>
        >
        > JS includes + CSS styles:
        >
        > <%-- put this at the bottom of the page above the footer for the page
        > where the autocomplete lives --%>
        > <style type="text/css">
        > #searchdiv {position:relative; width: 200px;} /* set width of
        > widget here*/
        > #keywordInput {position:relative;}
        > #searchContainer
        > {position:relative;bottom:2px;right:2px;border:1px solid
        > #999999;background:#FFFFFF;font-size:13px; color: #666666;
        > overflow:hidden;display:none;}
        > #searchContainer ul {position:relative; margin: 0px;
        > width:200px;padding: 0px;list-style:none;}
        > #searchContainer li
        >
        {padding:2px;cursor:default;white-space:nowrap;display:list-item;color:#666666}
        > #searchContainer li.highlight {background:#316ac5; color:#FFFFFF}
        > #searchshadow
        > {position:absolute;width:100%;margin:2px;z-index:5;background:#cecece;}
        > </style>
        > <!-- Dependencies -->
        > <script src="/js/yui/build/yahoo/yahoo.js"></script>
        > <script src="/js/yui/build/dom/dom.js"></script>
        > <script src="/js/yui/build/event/event.js"></script>
        > <script src="/js/yui/build/connection/connection.js"></script>
        > <script src="/js/yui/build/animation/animation.js"></script>
        > <script src="/js/yui/build/autocomplete/autocomplete-min.js"></script>
        > <!-- -->
        >
        >
        > MY JS for YAHOO OBJECTS:
        >
        >
        > // An XHR DataSource
        > var myServer = "/tagQuery.htm";
        > var mySchema = ["ResultSet.Result","keyword"]; //["?", "|"];
        > //["ResultItem", "KeyDataField"];
        > var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);
        >
        >
        > // Increase the cache size
        > //myDataSource.maxCacheEntries = 60
        >
        > // Match case sensitivity
        > myDataSource.queryMatchCase = false;
        >
        > // Match results that *contain* the query string as well as results
        > that start with query string
        > myDataSource.queryMatchContains = false;
        >
        > // Match results of query strings that are *subsets* of the current
        > query string
        > // myDataSource.queryMatchSubset = true;
        >
        > // Will now send http://url?key=foo
        > myDataSource.scriptQueryParam = "key";
        >
        > YAHOO.widget.AutoComplete.prototype.formatResult =
        > function(aResultItem, sQuery) {
        > var sResult = aResultItem[0];
        > if(sResult) {
        > return sResult;
        > }
        > else {
        > return "";
        > }
        > };
        > var myAutoComp = new
        > YAHOO.widget.AutoComplete('keywordInput','searchContainer',
        myDataSource);
        > // comas may delimited queries...
        > myAutoComp.delimChar = ",";
        > // Require user to type at least 1 characters before triggering a query
        > myAutoComp.minQueryLength = 1;
        > // Container will expand and collapse vertically
        > myAutoComp.animVert = false;
        > // Container will expand and collapse horizontally
        > myAutoComp.animHoriz = false;
        >
      • Dan Levine
        Nope, I mean IE on a PC. (A few people might still use that...) Does Yahoo s sample app work on Safari for you:
        Message 3 of 9 , May 26, 2006
        • 0 Attachment
          Nope, I mean IE on a PC.  (A few people might still use that...) 

          Does Yahoo's sample app work on Safari for you: http://developer.yahoo.com/yui/examples/autocomplete/ysearch_json.html

          It works for me in IE, so I know it's something in my implementation, but I can't trace it through.

          Please share the type of bug it is if you figure it out.

          dan


          On 5/25/06, ticklishturtletoe < ticklishturtletoe@...> wrote:
          I always debug JavaScript by inserting alerts throughout the area of
          code I suspect.

          I'm having the same success/failure with AutoComplete in
          FireFox/Safari, respectively.

          I love Apple to death.  I'm working on my Powerbook now.  But I think
          they must have their junior programmers working on Safari.  (Why does
          Apple need to make a browser anyway?)

          When you say IE, I hope you don't mean IE on the Mac.  If so, forget
          about it.  Nobody uses it.

          Cheers!
          TTT

          --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@...> wrote:
          >
          > Thank you for releasing this suite of tools.  I picked Autocomplete as
          > a feature to try out and see how quickly and easily it came together.
          >  The short answer is: it almost all came together great, but when it
          > got stuck I wasn't sure how to debug.  (CSS/DHTML debugging is
          > difficult enough when you write the source yourself!)  So I'll post
          > here and see if maybe someone else has had this issue.
          >
          > It works fine on Firefox 1.5, but not on IE or Safari.  The ajax call
          > *does* ping the server correctly, and recieve back correct results.
          > But from there I get no browser display except on Firefox.
          >
          > Any thoughts, or any recommendations for how to debug this type of
          > issue within the yahoo framework?
          >
          > client code snips below for my tagging widgets below.
          >
          > FORM:
          >
          > <form method="POST" action="/addTag.htm?obj_id=${object.id}">
          >   <div id="searchdiv">
          >     <input type="text" id="keywordInput" name="keyword" class="textBox">
          >     <div id="searchshadow"><div id="searchContainer"></div></div>
          >   </div>
          >   <input type="submit" class="submitBut" value="add tag">
          > </form>
          >
          > JS includes + CSS styles:
          >
          > <%-- put this at the bottom of the page above the footer for the page
          > where the autocomplete lives --%>
          > <style type="text/css">
          >     #searchdiv {position:relative; width: 200px;} /* set width of
          > widget here*/
          >     #keywordInput {position:relative;}
          >     #searchContainer
          > {position:relative;bottom:2px;right:2px;border:1px solid
          > #999999;background:#FFFFFF;font-size:13px; color: #666666;
          > overflow:hidden;display:none;}
          >     #searchContainer ul {position:relative; margin: 0px;
          > width:200px;padding: 0px;list-style:none;}
          >     #searchContainer li
          >
          {padding:2px;cursor:default;white-space:nowrap;display:list-item;color:#666666}
          >     #searchContainer li.highlight {background:#316ac5; color:#FFFFFF}
          >     #searchshadow
          > {position:absolute;width:100%;margin:2px;z-index:5;background:#cecece;}
          > </style>
          > <!-- Dependencies -->
          > <script src="/js/yui/build/yahoo/yahoo.js"></script>
          > <script src="/js/yui/build/dom/dom.js"></script>
          > <script src="/js/yui/build/event/event.js"></script>
          > <script src="/js/yui/build/connection/connection.js"></script>
          > <script src="/js/yui/build/animation/animation.js"></script>
          > <script src="/js/yui/build/autocomplete/autocomplete-min.js"></script>
          > <!--  -->
          >
          >
          > MY JS for YAHOO OBJECTS:
          >
          >
          > // An XHR DataSource
          > var myServer = "/tagQuery.htm";
          > var mySchema = ["ResultSet.Result","keyword"]; //["?", "|"];
          > //["ResultItem", "KeyDataField"];
          > var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);
          >
          >
          > // Increase the cache size
          > //myDataSource.maxCacheEntries = 60
          >
          > // Match case sensitivity
          > myDataSource.queryMatchCase = false;
          >
          > // Match results that *contain* the query string as well as results
          > that start with query string
          > myDataSource.queryMatchContains = false;
          >
          > // Match results of query strings that are *subsets* of the current
          > query string
          > //      myDataSource.queryMatchSubset = true;
          >
          > // Will now send http://url?key=foo
          > myDataSource.scriptQueryParam = "key";
          >
          > YAHOO.widget.AutoComplete.prototype.formatResult =
          > function(aResultItem, sQuery) {
          >     var sResult = aResultItem[0];
          >     if(sResult) {
          >         return sResult;
          >     }
          >     else {
          >         return "";
          >     }
          > };
          > var myAutoComp = new
          > YAHOO.widget.AutoComplete('keywordInput','searchContainer',
          myDataSource);
          > // comas may delimited queries...
          > myAutoComp.delimChar = ",";
          > // Require user to type at least 1 characters before triggering a query
          > myAutoComp.minQueryLength = 1;
          > // Container will expand and collapse vertically
          > myAutoComp.animVert = false;
          > // Container will expand and collapse horizontally
          > myAutoComp.animHoriz = false;
          >





          SPONSORED LINKS
          C programming language Computer programming languages Java programming language
          The c programming language C programming language Concept of programming language


          YAHOO! GROUPS LINKS




        • ticklishturtletoe
          The sample works on Safari and IE (PC). It didn t seem to work at first in Safari. It just didn t do anything. I went to a different app, then came back.
          Message 4 of 9 , May 26, 2006
          • 0 Attachment
            The sample works on Safari and IE (PC). It didn't seem to work at
            first in Safari. It just didn't do anything. I went to a different
            app, then came back. It worked after that.

            AutoComplete isn't working in my app on Safari, though. I'll let you
            know if I figure out why.

            Cheers!
            TTT

            --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@...> wrote:
            >
            > Nope, I mean IE on a PC. (A few people might still use that...)
            >
            > Does Yahoo's sample app work on Safari for you:
            > http://developer.yahoo.com/yui/examples/autocomplete/ysearch_json.html
            >
            > It works for me in IE, so I know it's something in my
            implementation, but I
            > can't trace it through.
            >
            > Please share the type of bug it is if you figure it out.
            >
            > dan
            >
            >
            > On 5/25/06, ticklishturtletoe < ticklishturtletoe@...> wrote:
            > >
            > > I always debug JavaScript by inserting alerts throughout the area of
            > > code I suspect.
            > >
            > > I'm having the same success/failure with AutoComplete in
            > > FireFox/Safari, respectively.
            > >
            > > I love Apple to death. I'm working on my Powerbook now. But I think
            > > they must have their junior programmers working on Safari. (Why does
            > > Apple need to make a browser anyway?)
            > >
            > > When you say IE, I hope you don't mean IE on the Mac. If so, forget
            > > about it. Nobody uses it.
            > >
            > > Cheers!
            > > TTT
            > >
            > > --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@> wrote:
            > > >
            > > > Thank you for releasing this suite of tools. I picked
            Autocomplete as
            > > > a feature to try out and see how quickly and easily it came
            together.
            > > > The short answer is: it almost all came together great, but when it
            > > > got stuck I wasn't sure how to debug. (CSS/DHTML debugging is
            > > > difficult enough when you write the source yourself!) So I'll post
            > > > here and see if maybe someone else has had this issue.
            > > >
            > > > It works fine on Firefox 1.5, but not on IE or Safari. The ajax
            call
            > > > *does* ping the server correctly, and recieve back correct results.
            > > > But from there I get no browser display except on Firefox.
            > > >
            > > > Any thoughts, or any recommendations for how to debug this type of
            > > > issue within the yahoo framework?
            > > >
            > > > client code snips below for my tagging widgets below.
            > > >
            > > > FORM:
            > > >
            > > > <form method="POST" action="/addTag.htm?obj_id=${object.id}">
            > > > <div id="searchdiv">
            > > > <input type="text" id="keywordInput" name="keyword"
            class="textBox">
            > > > <div id="searchshadow"><div id="searchContainer"></div></div>
            > > > </div>
            > > > <input type="submit" class="submitBut" value="add tag">
            > > > </form>
            > > >
            > > > JS includes + CSS styles:
            > > >
            > > > <%-- put this at the bottom of the page above the footer for the
            page
            > > > where the autocomplete lives --%>
            > > > <style type="text/css">
            > > > #searchdiv {position:relative; width: 200px;} /* set width of
            > > > widget here*/
            > > > #keywordInput {position:relative;}
            > > > #searchContainer
            > > > {position:relative;bottom:2px;right:2px;border:1px solid
            > > > #999999;background:#FFFFFF;font-size:13px; color: #666666;
            > > > overflow:hidden;display:none;}
            > > > #searchContainer ul {position:relative; margin: 0px;
            > > > width:200px;padding: 0px;list-style:none;}
            > > > #searchContainer li
            > > >
            > >
            > >
            {padding:2px;cursor:default;white-space:nowrap;display:list-item;color:#666666}
            > > > #searchContainer li.highlight {background:#316ac5;
            color:#FFFFFF}
            > > > #searchshadow
            > > >
            {position:absolute;width:100%;margin:2px;z-index:5;background:#cecece;}
            > > > </style>
            > > > <!-- Dependencies -->
            > > > <script src="/js/yui/build/yahoo/yahoo.js"></script>
            > > > <script src="/js/yui/build/dom/dom.js"></script>
            > > > <script src="/js/yui/build/event/event.js"></script>
            > > > <script src="/js/yui/build/connection/connection.js"></script>
            > > > <script src="/js/yui/build/animation/animation.js"></script>
            > > > <script
            src="/js/yui/build/autocomplete/autocomplete-min.js"></script>
            > > > <!-- -->
            > > >
            > > >
            > > > MY JS for YAHOO OBJECTS:
            > > >
            > > >
            > > > // An XHR DataSource
            > > > var myServer = "/tagQuery.htm";
            > > > var mySchema = ["ResultSet.Result","keyword"]; //["?", "|"];
            > > > //["ResultItem", "KeyDataField"];
            > > > var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);
            > > >
            > > >
            > > > // Increase the cache size
            > > > //myDataSource.maxCacheEntries = 60
            > > >
            > > > // Match case sensitivity
            > > > myDataSource.queryMatchCase = false;
            > > >
            > > > // Match results that *contain* the query string as well as results
            > > > that start with query string
            > > > myDataSource.queryMatchContains = false;
            > > >
            > > > // Match results of query strings that are *subsets* of the current
            > > > query string
            > > > // myDataSource.queryMatchSubset = true;
            > > >
            > > > // Will now send http://url?key=foo
            > > > myDataSource.scriptQueryParam = "key";
            > > >
            > > > YAHOO.widget.AutoComplete.prototype.formatResult =
            > > > function(aResultItem, sQuery) {
            > > > var sResult = aResultItem[0];
            > > > if(sResult) {
            > > > return sResult;
            > > > }
            > > > else {
            > > > return "";
            > > > }
            > > > };
            > > > var myAutoComp = new
            > > > YAHOO.widget.AutoComplete('keywordInput','searchContainer',
            > > myDataSource);
            > > > // comas may delimited queries...
            > > > myAutoComp.delimChar = ",";
            > > > // Require user to type at least 1 characters before triggering
            a query
            > > > myAutoComp.minQueryLength = 1;
            > > > // Container will expand and collapse vertically
            > > > myAutoComp.animVert = false;
            > > > // Container will expand and collapse horizontally
            > > > myAutoComp.animHoriz = false;
            > > >
            > >
            > >
            > >
            > >
            > >
            > > SPONSORED LINKS
            > > C programming
            language<http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=lC1PxfzvANy_Br-nPkXYTA>
            Computer
            > > programming
            languages<http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=7XFXh-0Mon1IfLuOVlwvdg>
            Java
            > > programming
            language<http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=UITodqn0qTCUcae_mpRQog>
            The
            > > c programming
            language<http://groups.yahoo.com/gads?t=ms&k=The+c+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=xnZC2-BzDSLhhir3MLtssg>
            C
            > > programming
            language<http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=RTzTl3BOJWbWK14CdUrO0w>
            Concept
            > > of programming
            language<http://groups.yahoo.com/gads?t=ms&k=Concept+of+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=x4ueM0tA417JDq3ckdJ9CQ>
            > > ------------------------------
            > > YAHOO! GROUPS LINKS
            > >
            > >
            > > - Visit your group
            "ydn-javascript<http://groups.yahoo.com/group/ydn-javascript>"
            > > on the web.
            > >
            > > - To unsubscribe from this group, send an email to:
            > >
            ydn-javascript-unsubscribe@yahoogroups.com<ydn-javascript-unsubscribe@yahoogroups.com?subject=Unsubscribe>
            > >
            > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            > > Service <http://docs.yahoo.com/info/terms/> .
            > >
            > >
            > > ------------------------------
            > >
            >
          • jennykhan
            Hi Dan, Perhaps there is something about your JSON response that is causing the problem. For the implementation examples, the server response MIME type has
            Message 5 of 9 , May 30, 2006
            • 0 Attachment
              Hi Dan,

              Perhaps there is something about your JSON response that is causing
              the problem. For the implementation examples, the server response MIME
              type has been set to "application/x-javascript" for JSON data.

              Hope that helps,
              Jenny



              --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@...> wrote:
              >
              > Thank you for releasing this suite of tools. I picked Autocomplete as
              > a feature to try out and see how quickly and easily it came together.
              > The short answer is: it almost all came together great, but when it
              > got stuck I wasn't sure how to debug. (CSS/DHTML debugging is
              > difficult enough when you write the source yourself!) So I'll post
              > here and see if maybe someone else has had this issue.
              >
              > It works fine on Firefox 1.5, but not on IE or Safari. The ajax call
              > *does* ping the server correctly, and recieve back correct results.
              > But from there I get no browser display except on Firefox.
              >
              > Any thoughts, or any recommendations for how to debug this type of
              > issue within the yahoo framework?
              >
              > client code snips below for my tagging widgets below.
              >
              > FORM:
              >
              > <form method="POST" action="/addTag.htm?obj_id=${object.id}">
              > <div id="searchdiv">
              > <input type="text" id="keywordInput" name="keyword" class="textBox">
              > <div id="searchshadow"><div id="searchContainer"></div></div>
              > </div>
              > <input type="submit" class="submitBut" value="add tag">
              > </form>
              >
              > JS includes + CSS styles:
              >
              > <%-- put this at the bottom of the page above the footer for the page
              > where the autocomplete lives --%>
              > <style type="text/css">
              > #searchdiv {position:relative; width: 200px;} /* set width of
              > widget here*/
              > #keywordInput {position:relative;}
              > #searchContainer
              > {position:relative;bottom:2px;right:2px;border:1px solid
              > #999999;background:#FFFFFF;font-size:13px; color: #666666;
              > overflow:hidden;display:none;}
              > #searchContainer ul {position:relative; margin: 0px;
              > width:200px;padding: 0px;list-style:none;}
              > #searchContainer li
              >
              {padding:2px;cursor:default;white-space:nowrap;display:list-item;color:#666666}
              > #searchContainer li.highlight {background:#316ac5; color:#FFFFFF}
              > #searchshadow
              > {position:absolute;width:100%;margin:2px;z-index:5;background:#cecece;}
              > </style>
              > <!-- Dependencies -->
              > <script src="/js/yui/build/yahoo/yahoo.js"></script>
              > <script src="/js/yui/build/dom/dom.js"></script>
              > <script src="/js/yui/build/event/event.js"></script>
              > <script src="/js/yui/build/connection/connection.js"></script>
              > <script src="/js/yui/build/animation/animation.js"></script>
              > <script src="/js/yui/build/autocomplete/autocomplete-min.js"></script>
              > <!-- -->
              >
              >
              > MY JS for YAHOO OBJECTS:
              >
              >
              > // An XHR DataSource
              > var myServer = "/tagQuery.htm";
              > var mySchema = ["ResultSet.Result","keyword"]; //["?", "|"];
              > //["ResultItem", "KeyDataField"];
              > var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);
              >
              >
              > // Increase the cache size
              > //myDataSource.maxCacheEntries = 60
              >
              > // Match case sensitivity
              > myDataSource.queryMatchCase = false;
              >
              > // Match results that *contain* the query string as well as results
              > that start with query string
              > myDataSource.queryMatchContains = false;
              >
              > // Match results of query strings that are *subsets* of the current
              > query string
              > // myDataSource.queryMatchSubset = true;
              >
              > // Will now send http://url?key=foo
              > myDataSource.scriptQueryParam = "key";
              >
              > YAHOO.widget.AutoComplete.prototype.formatResult =
              > function(aResultItem, sQuery) {
              > var sResult = aResultItem[0];
              > if(sResult) {
              > return sResult;
              > }
              > else {
              > return "";
              > }
              > };
              > var myAutoComp = new
              > YAHOO.widget.AutoComplete('keywordInput','searchContainer',
              myDataSource);
              > // comas may delimited queries...
              > myAutoComp.delimChar = ",";
              > // Require user to type at least 1 characters before triggering a query
              > myAutoComp.minQueryLength = 1;
              > // Container will expand and collapse vertically
              > myAutoComp.animVert = false;
              > // Container will expand and collapse horizontally
              > myAutoComp.animHoriz = false;
              >
            • Dan Levine
              Hey Jenny, I tried setting the response Content Type to that with no change -- no luck. I appreciate your reply though! There s obviously a HUGE queue of
              Message 6 of 9 , May 30, 2006
              • 0 Attachment
                Hey Jenny,

                I tried setting the response Content Type to that with no change -- no luck.  I appreciate your reply though!  There's obviously a HUGE queue of questions coming through with this JS codebase.  I'll include my JSON code below and see if that triggers any thoughts:


                {"ResultSet":
                    {"Result": [

                        {"keyword":"christian",
                        },

                        {"keyword":"christianity",
                        },

                        {"keyword":"christmas",
                        },

                        {"keyword":"christ",
                        },

                        {"keyword":"christa belle",
                        },

                        {"keyword":"christian right",
                        },

                        {"keyword":"christmas cookies",
                        },

                    ]}
                }


                Again, my schema init: var mySchema = ["ResultSet.Result ","keyword"];

                Full code copied way down below...

                Thanks!

                dan




                On 5/30/06, jennykhan < jennyhan@...> wrote:
                Hi Dan,

                Perhaps there is something about your JSON response that is causing
                the problem. For the implementation examples, the server response MIME
                type has been set to "application/x-javascript" for JSON data.

                Hope that helps,
                Jenny




                --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@...> wrote:
                >
                > Thank you for releasing this suite of tools.  I picked Autocomplete as
                > a feature to try out and see how quickly and easily it came together.
                >  The short answer is: it almost all came together great, but when it
                > got stuck I wasn't sure how to debug.  (CSS/DHTML debugging is
                > difficult enough when you write the source yourself!)  So I'll post
                > here and see if maybe someone else has had this issue.
                >
                > It works fine on Firefox 1.5, but not on IE or Safari.  The ajax call
                > *does* ping the server correctly, and recieve back correct results.
                > But from there I get no browser display except on Firefox.
                >
                > Any thoughts, or any recommendations for how to debug this type of
                > issue within the yahoo framework?
                >
                > client code snips below for my tagging widgets below.
                >
                > FORM:
                >
                > <form method="POST" action="/addTag.htm?obj_id=${object.id}">
                >   <div id="searchdiv">
                >     <input type="text" id="keywordInput" name="keyword" class="textBox">
                >     <div id="searchshadow"><div id="searchContainer"></div></div>
                >   </div>
                >   <input type="submit" class="submitBut" value="add tag">
                > </form>
                >
                > JS includes + CSS styles:
                >
                > <%-- put this at the bottom of the page above the footer for the page
                > where the autocomplete lives --%>
                > <style type="text/css">
                >     #searchdiv {position:relative; width: 200px;} /* set width of
                > widget here*/
                >     #keywordInput {position:relative;}
                >     #searchContainer
                > {position:relative;bottom:2px;right:2px;border:1px solid
                > #999999;background:#FFFFFF;font-size:13px; color: #666666;
                > overflow:hidden;display:none;}
                >     #searchContainer ul {position:relative; margin: 0px;
                > width:200px;padding: 0px;list-style:none;}
                >     #searchContainer li
                >
                {padding:2px;cursor:default;white-space:nowrap;display:list-item;color:#666666}
                >     #searchContainer li.highlight {background:#316ac5; color:#FFFFFF}
                >     #searchshadow
                > {position:absolute;width:100%;margin:2px;z-index:5;background:#cecece;}
                > </style>
                > <!-- Dependencies -->
                > <script src="/js/yui/build/yahoo/yahoo.js"></script>
                > <script src="/js/yui/build/dom/dom.js"></script>
                > <script src="/js/yui/build/event/event.js"></script>
                > <script src="/js/yui/build/connection/connection.js"></script>
                > <script src="/js/yui/build/animation/animation.js"></script>
                > <script src="/js/yui/build/autocomplete/autocomplete-min.js"></script>
                > <!--  -->
                >
                >
                > MY JS for YAHOO OBJECTS:
                >
                >
                > // An XHR DataSource
                > var myServer = "/tagQuery.htm";
                > var mySchema = ["ResultSet.Result","keyword"]; //["?", "|"];
                > //["ResultItem", "KeyDataField"];
                > var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);
                >
                >
                > // Increase the cache size
                > //myDataSource.maxCacheEntries = 60
                >
                > // Match case sensitivity
                > myDataSource.queryMatchCase = false;
                >
                > // Match results that *contain* the query string as well as results
                > that start with query string
                > myDataSource.queryMatchContains = false;
                >
                > // Match results of query strings that are *subsets* of the current
                > query string
                > //      myDataSource.queryMatchSubset = true;
                >
                > // Will now send http://url?key=foo
                > myDataSource.scriptQueryParam = "key";
                >
                > YAHOO.widget.AutoComplete.prototype.formatResult =
                > function(aResultItem, sQuery) {
                >     var sResult = aResultItem[0];
                >     if(sResult) {
                >         return sResult;
                >     }
                >     else {
                >         return "";
                >     }
                > };
                > var myAutoComp = new
                > YAHOO.widget.AutoComplete('keywordInput','searchContainer',
                myDataSource);
                > // comas may delimited queries...
                > myAutoComp.delimChar = ",";
                > // Require user to type at least 1 characters before triggering a query
                > myAutoComp.minQueryLength = 1;
                > // Container will expand and collapse vertically
                > myAutoComp.animVert = false;
                > // Container will expand and collapse horizontally
                > myAutoComp.animHoriz = false;
                >







                SPONSORED LINKS


                YAHOO! GROUPS LINKS




              • jennykhan
                Hi Dan, Try removing the commas within each result object. Since each object only has one param/value pair, the comma is unnecessary. So, like this:
                Message 7 of 9 , May 30, 2006
                • 0 Attachment
                  Hi Dan,

                  Try removing the commas within each result object. Since each object
                  only has one param/value pair, the comma is unnecessary. So, like this:

                  {"ResultSet":
                  {"Result": [

                  {"keyword":"christian"},

                  {"keyword":"christianity"},

                  {"keyword":"christmas"},

                  {"keyword":"christ"},



                  Jenny






                  --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@...> wrote:
                  >
                  > Hey Jenny,
                  >
                  > I tried setting the response Content Type to that with no change -- no
                  > luck. I appreciate your reply though! There's obviously a HUGE
                  queue of
                  > questions coming through with this JS codebase. I'll include my
                  JSON code
                  > below and see if that triggers any thoughts:
                  >
                  >
                  > {"ResultSet":
                  > {"Result": [
                  >
                  > {"keyword":"christian",
                  > },
                  >
                  > {"keyword":"christianity",
                  > },
                  >
                  > {"keyword":"christmas",
                  > },
                  >
                  > {"keyword":"christ",
                  > },
                  >
                  > {"keyword":"christa belle",
                  > },
                  >
                  > {"keyword":"christian right",
                  > },
                  >
                  > {"keyword":"christmas cookies",
                  > },
                  >
                  > ]}
                  > }
                  >
                  >
                  > Again, my schema init: var mySchema = ["ResultSet.Result","keyword"];
                  >
                  > Full code copied way down below...
                  >
                  > Thanks!
                  >
                  > dan
                  >
                  >
                  >
                  >
                  > On 5/30/06, jennykhan <jennyhan@...> wrote:
                  > >
                  > > Hi Dan,
                  > >
                  > > Perhaps there is something about your JSON response that is causing
                  > > the problem. For the implementation examples, the server response MIME
                  > > type has been set to "application/x-javascript" for JSON data.
                  > >
                  > > Hope that helps,
                  > > Jenny
                  > >
                  > >
                  > >
                  > >
                  > > --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@> wrote:
                  > > >
                  > > > Thank you for releasing this suite of tools. I picked
                  Autocomplete as
                  > > > a feature to try out and see how quickly and easily it came
                  together.
                  > > > The short answer is: it almost all came together great, but when it
                  > > > got stuck I wasn't sure how to debug. (CSS/DHTML debugging is
                  > > > difficult enough when you write the source yourself!) So I'll post
                  > > > here and see if maybe someone else has had this issue.
                  > > >
                  > > > It works fine on Firefox 1.5, but not on IE or Safari. The ajax
                  call
                  > > > *does* ping the server correctly, and recieve back correct results.
                  > > > But from there I get no browser display except on Firefox.
                  > > >
                  > > > Any thoughts, or any recommendations for how to debug this type of
                  > > > issue within the yahoo framework?
                  > > >
                  > > > client code snips below for my tagging widgets below.
                  > > >
                  > > > FORM:
                  > > >
                  > > > <form method="POST" action="/addTag.htm?obj_id=${object.id}">
                  > > > <div id="searchdiv">
                  > > > <input type="text" id="keywordInput" name="keyword"
                  class="textBox">
                  > > > <div id="searchshadow"><div id="searchContainer"></div></div>
                  > > > </div>
                  > > > <input type="submit" class="submitBut" value="add tag">
                  > > > </form>
                  > > >
                  > > > JS includes + CSS styles:
                  > > >
                  > > > <%-- put this at the bottom of the page above the footer for the
                  page
                  > > > where the autocomplete lives --%>
                  > > > <style type="text/css">
                  > > > #searchdiv {position:relative; width: 200px;} /* set width of
                  > > > widget here*/
                  > > > #keywordInput {position:relative;}
                  > > > #searchContainer
                  > > > {position:relative;bottom:2px;right:2px;border:1px solid
                  > > > #999999;background:#FFFFFF;font-size:13px; color: #666666;
                  > > > overflow:hidden;display:none;}
                  > > > #searchContainer ul {position:relative; margin: 0px;
                  > > > width:200px;padding: 0px;list-style:none;}
                  > > > #searchContainer li
                  > > >
                  > >
                  > >
                  {padding:2px;cursor:default;white-space:nowrap;display:list-item;color:#666666}
                  > > > #searchContainer li.highlight {background:#316ac5;
                  color:#FFFFFF}
                  > > > #searchshadow
                  > > >
                  {position:absolute;width:100%;margin:2px;z-index:5;background:#cecece;}
                  > > > </style>
                  > > > <!-- Dependencies -->
                  > > > <script src="/js/yui/build/yahoo/yahoo.js"></script>
                  > > > <script src="/js/yui/build/dom/dom.js"></script>
                  > > > <script src="/js/yui/build/event/event.js"></script>
                  > > > <script src="/js/yui/build/connection/connection.js"></script>
                  > > > <script src="/js/yui/build/animation/animation.js"></script>
                  > > > <script
                  src="/js/yui/build/autocomplete/autocomplete-min.js"></script>
                  > > > <!-- -->
                  > > >
                  > > >
                  > > > MY JS for YAHOO OBJECTS:
                  > > >
                  > > >
                  > > > // An XHR DataSource
                  > > > var myServer = "/tagQuery.htm";
                  > > > var mySchema = ["ResultSet.Result","keyword"]; //["?", "|"];
                  > > > //["ResultItem", "KeyDataField"];
                  > > > var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);
                  > > >
                  > > >
                  > > > // Increase the cache size
                  > > > //myDataSource.maxCacheEntries = 60
                  > > >
                  > > > // Match case sensitivity
                  > > > myDataSource.queryMatchCase = false;
                  > > >
                  > > > // Match results that *contain* the query string as well as results
                  > > > that start with query string
                  > > > myDataSource.queryMatchContains = false;
                  > > >
                  > > > // Match results of query strings that are *subsets* of the current
                  > > > query string
                  > > > // myDataSource.queryMatchSubset = true;
                  > > >
                  > > > // Will now send http://url?key=foo
                  > > > myDataSource.scriptQueryParam = "key";
                  > > >
                  > > > YAHOO.widget.AutoComplete.prototype.formatResult =
                  > > > function(aResultItem, sQuery) {
                  > > > var sResult = aResultItem[0];
                  > > > if(sResult) {
                  > > > return sResult;
                  > > > }
                  > > > else {
                  > > > return "";
                  > > > }
                  > > > };
                  > > > var myAutoComp = new
                  > > > YAHOO.widget.AutoComplete('keywordInput','searchContainer',
                  > > myDataSource);
                  > > > // comas may delimited queries...
                  > > > myAutoComp.delimChar = ",";
                  > > > // Require user to type at least 1 characters before triggering
                  a query
                  > > > myAutoComp.minQueryLength = 1;
                  > > > // Container will expand and collapse vertically
                  > > > myAutoComp.animVert = false;
                  > > > // Container will expand and collapse horizontally
                  > > > myAutoComp.animHoriz = false;
                  > > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > > SPONSORED LINKS
                  > > C programming
                  language<http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=lC1PxfzvANy_Br-nPkXYTA>
                  Computer
                  > > programming
                  languages<http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=7XFXh-0Mon1IfLuOVlwvdg>
                  Java
                  > > programming
                  language<http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=UITodqn0qTCUcae_mpRQog>
                  The
                  > > c programming
                  language<http://groups.yahoo.com/gads?t=ms&k=The+c+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=xnZC2-BzDSLhhir3MLtssg>
                  C
                  > > programming
                  language<http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=RTzTl3BOJWbWK14CdUrO0w>
                  Concept
                  > > of programming
                  language<http://groups.yahoo.com/gads?t=ms&k=Concept+of+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=x4ueM0tA417JDq3ckdJ9CQ>
                  > >
                  > > ------------------------------
                  > > YAHOO! GROUPS LINKS
                  > >
                  > >
                  > > - Visit your group
                  "ydn-javascript<http://groups.yahoo.com/group/ydn-javascript>"
                  > > on the web.
                  > >
                  > > - To unsubscribe from this group, send an email to:
                  > >
                  ydn-javascript-unsubscribe@yahoogroups.com<ydn-javascript-unsubscribe@yahoogroups.com?subject=Unsubscribe>
                  > >
                  > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                  > > Service <http://docs.yahoo.com/info/terms/>.
                  > >
                  > >
                  > > ------------------------------
                  > >
                  >
                • Dan Levine
                  Thanks again for the reply Jenny! I tried removing the extra commas with no change. BTW, the example on the page has extra trainling commas in the JSON
                  Message 8 of 9 , May 30, 2006
                  • 0 Attachment
                    Thanks again for the reply Jenny!

                    I tried removing the extra commas with no change. 

                    BTW, the example on the page has extra trainling commas in the JSON example: http://developer.yahoo.com/yui/autocomplete/index.html#json

                    Dan


                    On 5/30/06, jennykhan <jennyhan@... > wrote:
                    Hi Dan,

                    Try removing the commas within each result object. Since each object
                    only has one param/value pair, the comma is unnecessary. So, like this:


                    {"ResultSet":
                        {"Result": [

                            {"keyword":"christian"},

                            {"keyword":"christianity"},

                            {"keyword":"christmas"},

                            {"keyword":"christ"},



                    Jenny






                    --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@...> wrote:
                    >
                    > Hey Jenny,
                    >
                    > I tried setting the response Content Type to that with no change -- no
                    > luck.  I appreciate your reply though!  There's obviously a HUGE
                    queue of
                    > questions coming through with this JS codebase.  I'll include my
                    JSON code
                    > below and see if that triggers any thoughts:
                    >
                    >
                    > {"ResultSet":
                    >     {"Result": [
                    >
                    >         {"keyword":"christian",
                    >         },
                    >
                    >         {"keyword":"christianity",
                    >         },
                    >
                    >         {"keyword":"christmas",
                    >         },
                    >
                    >         {"keyword":"christ",
                    >         },
                    >
                    >         {"keyword":"christa belle",
                    >         },
                    >
                    >         {"keyword":"christian right",
                    >         },
                    >
                    >         {"keyword":"christmas cookies",
                    >         },
                    >
                    >     ]}
                    > }
                    >
                    >
                    > Again, my schema init: var mySchema = ["ResultSet.Result","keyword"];
                    >
                    > Full code copied way down below...
                    >
                    > Thanks!
                    >
                    > dan
                    >
                    >
                    >
                    >
                    > On 5/30/06, jennykhan <jennyhan@...> wrote:
                    > >
                    > > Hi Dan,
                    > >
                    > > Perhaps there is something about your JSON response that is causing
                    > > the problem. For the implementation examples, the server response MIME
                    > > type has been set to "application/x-javascript" for JSON data.
                    > >
                    > > Hope that helps,
                    > > Jenny
                    > >
                    > >
                    > >
                    > >
                    > > --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@> wrote:
                    > > >
                    > > > Thank you for releasing this suite of tools.  I picked
                    Autocomplete as
                    > > > a feature to try out and see how quickly and easily it came
                    together.
                    > > >  The short answer is: it almost all came together great, but when it
                    > > > got stuck I wasn't sure how to debug.  (CSS/DHTML debugging is
                    > > > difficult enough when you write the source yourself!)  So I'll post
                    > > > here and see if maybe someone else has had this issue.
                    > > >
                    > > > It works fine on Firefox 1.5, but not on IE or Safari.  The ajax
                    call
                    > > > *does* ping the server correctly, and recieve back correct results.
                    > > > But from there I get no browser display except on Firefox.
                    > > >
                    > > > Any thoughts, or any recommendations for how to debug this type of
                    > > > issue within the yahoo framework?
                    > > >
                    > > > client code snips below for my tagging widgets below.
                    > > >
                    > > > FORM:
                    > > >
                    > > > <form method="POST" action="/addTag.htm?obj_id=${object.id}">
                    > > >   <div id="searchdiv">
                    > > >     <input type="text" id="keywordInput" name="keyword"
                    class="textBox">
                    > > >     <div id="searchshadow"><div id="searchContainer"></div></div>
                    > > >   </div>
                    > > >   <input type="submit" class="submitBut" value="add tag">
                    > > > </form>
                    > > >
                    > > > JS includes + CSS styles:
                    > > >
                    > > > <%-- put this at the bottom of the page above the footer for the
                    page
                    > > > where the autocomplete lives --%>
                    > > > <style type="text/css">
                    > > >     #searchdiv {position:relative; width: 200px;} /* set width of
                    > > > widget here*/
                    > > >     #keywordInput {position:relative;}
                    > > >     #searchContainer
                    > > > {position:relative;bottom:2px;right:2px;border:1px solid
                    > > > #999999;background:#FFFFFF;font-size:13px; color: #666666;
                    > > > overflow:hidden;display:none;}
                    > > >     #searchContainer ul {position:relative; margin: 0px;
                    > > > width:200px;padding: 0px;list-style:none;}
                    > > >     #searchContainer li
                    > > >
                    > >
                    > >
                    {padding:2px;cursor:default;white-space:nowrap;display:list-item;color:#666666}
                    > > >     #searchContainer li.highlight {background:#316ac5;
                    color:#FFFFFF}
                    > > >     #searchshadow
                    > > >
                    {position:absolute;width:100%;margin:2px;z-index:5;background:#cecece;}
                    > > > </style>
                    > > > <!-- Dependencies -->
                    > > > <script src="/js/yui/build/yahoo/yahoo.js"></script>
                    > > > <script src="/js/yui/build/dom/dom.js"></script>
                    > > > <script src="/js/yui/build/event/event.js"></script>
                    > > > <script src="/js/yui/build/connection/connection.js"></script>
                    > > > <script src="/js/yui/build/animation/animation.js"></script>
                    > > > <script
                    src="/js/yui/build/autocomplete/autocomplete-min.js"></script>
                    > > > <!--  -->
                    > > >
                    > > >
                    > > > MY JS for YAHOO OBJECTS:
                    > > >
                    > > >
                    > > > // An XHR DataSource
                    > > > var myServer = "/tagQuery.htm";
                    > > > var mySchema = ["ResultSet.Result","keyword"]; //["?", "|"];
                    > > > //["ResultItem", "KeyDataField"];
                    > > > var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);
                    > > >
                    > > >
                    > > > // Increase the cache size
                    > > > //myDataSource.maxCacheEntries = 60
                    > > >
                    > > > // Match case sensitivity
                    > > > myDataSource.queryMatchCase = false;
                    > > >
                    > > > // Match results that *contain* the query string as well as results
                    > > > that start with query string
                    > > > myDataSource.queryMatchContains = false;
                    > > >
                    > > > // Match results of query strings that are *subsets* of the current
                    > > > query string
                    > > > //      myDataSource.queryMatchSubset = true;
                    > > >
                    > > > // Will now send http://url?key=foo
                    > > > myDataSource.scriptQueryParam = "key";
                    > > >
                    > > > YAHOO.widget.AutoComplete.prototype.formatResult =
                    > > > function(aResultItem, sQuery) {
                    > > >     var sResult = aResultItem[0];
                    > > >     if(sResult) {
                    > > >         return sResult;
                    > > >     }
                    > > >     else {
                    > > >         return "";
                    > > >     }
                    > > > };
                    > > > var myAutoComp = new
                    > > > YAHOO.widget.AutoComplete('keywordInput','searchContainer',
                    > > myDataSource);
                    > > > // comas may delimited queries...
                    > > > myAutoComp.delimChar = ",";
                    > > > // Require user to type at least 1 characters before triggering
                    a query
                    > > > myAutoComp.minQueryLength = 1;
                    > > > // Container will expand and collapse vertically
                    > > > myAutoComp.animVert = false;
                    > > > // Container will expand and collapse horizontally
                    > > > myAutoComp.animHoriz = false;
                    > > >
                    > >
                    > >
                    > >
                    > >
                    > >
                    > >
                    > >
                    > >  SPONSORED LINKS
                    > >    C programming
                    language< http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=lC1PxfzvANy_Br-nPkXYTA >
                    Computer
                    > > programming
                    languages< http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=7XFXh-0Mon1IfLuOVlwvdg >
                    Java
                    > > programming
                    language< http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=UITodqn0qTCUcae_mpRQog >
                    The
                    > > c programming
                    language< http://groups.yahoo.com/gads?t=ms&k=The+c+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=xnZC2-BzDSLhhir3MLtssg >
                    C
                    > > programming
                    language< http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=RTzTl3BOJWbWK14CdUrO0w >
                    Concept
                    > > of programming
                    language< http://groups.yahoo.com/gads?t=ms&k=Concept+of+programming+language&w1=C+programming+language&w2=Computer+programming+languages&w3=Java+programming+language&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+programming+language&c=6&s=194&.sig=x4ueM0tA417JDq3ckdJ9CQ >
                    > >
                    > >  ------------------------------
                    > > YAHOO! GROUPS LINKS
                    > >
                    > >
                    > >    -  Visit your group

                    > >    on the web.
                    > >
                    > >    -  To unsubscribe from this group, send an email to:
                    > >   
                    ydn-javascript-unsubscribe@yahoogroups.com< ydn-javascript-unsubscribe@yahoogroups.com?subject=Unsubscribe>
                    > >
                    > >    -  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                    > >    Service <http://docs.yahoo.com/info/terms/>.
                    > >
                    > >
                    > >  ------------------------------
                    > >
                    >






                    SPONSORED LINKS
                    C programming language Computer programming languages Java programming language
                    The c programming language C programming language Concept of programming language


                    YAHOO! GROUPS LINKS




                  • jennykhan
                    Oops, thanks for catching that, Dan. What would be really helpful is if you could post a link to a live instance of the problem page. If not then, perhaps you
                    Message 9 of 9 , May 30, 2006
                    • 0 Attachment
                      Oops, thanks for catching that, Dan. What would be really helpful is
                      if you could post a link to a live instance of the problem page. If
                      not then, perhaps you could paste in all the relevant source code, not
                      only to the HTML, but also the server side code that returns the JSON.
                      Without a reproducible case to work with, I'm afraid I'm working blind.

                      Thanks,
                      Jenny

                      --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@...> wrote:
                      >
                      > Thanks again for the reply Jenny!
                      >
                      > I tried removing the extra commas with no change.
                      >
                      > BTW, the example on the page has extra trainling commas in the JSON
                      example:
                      > http://developer.yahoo.com/yui/autocomplete/index.html#json
                      >
                      > Dan
                      >
                      >
                      > On 5/30/06, jennykhan <jennyhan@...> wrote:
                      > >
                      > > Hi Dan,
                      > >
                      > > Try removing the commas within each result object. Since each object
                      > > only has one param/value pair, the comma is unnecessary. So, like
                      this:
                      > >
                      > >
                      > > {"ResultSet":
                      > > {"Result": [
                      > >
                      > > {"keyword":"christian"},
                      > >
                      > > {"keyword":"christianity"},
                      > >
                      > > {"keyword":"christmas"},
                      > >
                      > > {"keyword":"christ"},
                      > >
                      > >
                      > >
                      > > Jenny
                      > >
                      > >
                      > >
                      > >
                      > >
                      > >
                      > > --- In ydn-javascript@yahoogroups.com, "Dan Levine" <dslevine@> wrote:
                      > > >
                      > > > Hey Jenny,
                      > > >
                      > > > I tried setting the response Content Type to that with no change
                      -- no
                      > > > luck. I appreciate your reply though! There's obviously a HUGE
                      > > queue of
                      > > > questions coming through with this JS codebase. I'll include my
                      > > JSON code
                      > > > below and see if that triggers any thoughts:
                      > > >
                      > > >
                      > > > {"ResultSet":
                      > > > {"Result": [
                      > > >
                      > > > {"keyword":"christian",
                      > > > },
                      > > >
                      > > > {"keyword":"christianity",
                      > > > },
                      > > >
                      > > > {"keyword":"christmas",
                      > > > },
                      > > >
                      > > > {"keyword":"christ",
                      > > > },
                      > > >
                      > > > {"keyword":"christa belle",
                      > > > },
                      > > >
                      > > > {"keyword":"christian right",
                      > > > },
                      > > >
                      > > > {"keyword":"christmas cookies",
                      > > > },
                      > > >
                      > > > ]}
                      > > > }
                      > > >
                      > > >
                      > > > Again, my schema init: var mySchema =
                      ["ResultSet.Result","keyword"];
                      > > >
                      > > > Full code copied way down below...
                      > > >
                      > > > Thanks!
                      > > >
                      > > > dan
                      > > >
                      > > >
                      > > >
                      > > >
                      > > > On 5/30/06, jennykhan <jennyhan@> wrote:
                      > > > >
                      > > > > Hi Dan,
                      > > > >
                      > > > > Perhaps there is something about your JSON response that is
                      causing
                      > > > > the problem. For the implementation examples, the server
                      response MIME
                      > > > > type has been set to "application/x-javascript" for JSON data.
                      > > > >
                      > > > > Hope that helps,
                      > > > > Jenny
                      > > > >
                      > > > >
                      > > > >
                      > > > >
                      > > > > --- In ydn-javascript@yahoogroups.com, "Dan Levine"
                      <dslevine@> wrote:
                      > > > > >
                      > > > > > Thank you for releasing this suite of tools. I picked
                      > > Autocomplete as
                      > > > > > a feature to try out and see how quickly and easily it came
                      > > together.
                      > > > > > The short answer is: it almost all came together great, but
                      when it
                      > > > > > got stuck I wasn't sure how to debug. (CSS/DHTML debugging is
                      > > > > > difficult enough when you write the source yourself!) So
                      I'll post
                      > > > > > here and see if maybe someone else has had this issue.
                      > > > > >
                      > > > > > It works fine on Firefox 1.5, but not on IE or Safari. The ajax
                      > > call
                      > > > > > *does* ping the server correctly, and recieve back correct
                      results.
                      > > > > > But from there I get no browser display except on Firefox.
                      > > > > >
                      > > > > > Any thoughts, or any recommendations for how to debug this
                      type of
                      > > > > > issue within the yahoo framework?
                      > > > > >
                      > > > > > client code snips below for my tagging widgets below.
                      > > > > >
                      > > > > > FORM:
                      > > > > >
                      > > > > > <form method="POST" action="/addTag.htm?obj_id=${object.id}">
                      > > > > > <div id="searchdiv">
                      > > > > > <input type="text" id="keywordInput" name="keyword"
                      > > class="textBox">
                      > > > > > <div id="searchshadow"><div
                      id="searchContainer"></div></div>
                      > > > > > </div>
                      > > > > > <input type="submit" class="submitBut" value="add tag">
                      > > > > > </form>
                      > > > > >
                      > > > > > JS includes + CSS styles:
                      > > > > >
                      > > > > > <%-- put this at the bottom of the page above the footer for the
                      > > page
                      > > > > > where the autocomplete lives --%>
                      > > > > > <style type="text/css">
                      > > > > > #searchdiv {position:relative; width: 200px;} /* set
                      width of
                      > > > > > widget here*/
                      > > > > > #keywordInput {position:relative;}
                      > > > > > #searchContainer
                      > > > > > {position:relative;bottom:2px;right:2px;border:1px solid
                      > > > > > #999999;background:#FFFFFF;font-size:13px; color: #666666;
                      > > > > > overflow:hidden;display:none;}
                      > > > > > #searchContainer ul {position:relative; margin: 0px;
                      > > > > > width:200px;padding: 0px;list-style:none;}
                      > > > > > #searchContainer li
                      > > > > >
                      > > > >
                      > > > >
                      > >
                      > >
                      {padding:2px;cursor:default;white-space:nowrap;display:list-item;color:#666666}
                      > > > > > #searchContainer li.highlight {background:#316ac5;
                      > > color:#FFFFFF}
                      > > > > > #searchshadow
                      > > > > >
                      > >
                      {position:absolute;width:100%;margin:2px;z-index:5;background:#cecece;}
                      > > > > > </style>
                      > > > > > <!-- Dependencies -->
                      > > > > > <script src="/js/yui/build/yahoo/yahoo.js"></script>
                      > > > > > <script src="/js/yui/build/dom/dom.js"></script>
                      > > > > > <script src="/js/yui/build/event/event.js"></script>
                      > > > > > <script src="/js/yui/build/connection/connection.js"></script>
                      > > > > > <script src="/js/yui/build/animation/animation.js"></script>
                      > > > > > <script
                      > > src="/js/yui/build/autocomplete/autocomplete-min.js"></script>
                      > > > > > <!-- -->
                      > > > > >
                      > > > > >
                      > > > > > MY JS for YAHOO OBJECTS:
                      > > > > >
                      > > > > >
                      > > > > > // An XHR DataSource
                      > > > > > var myServer = "/tagQuery.htm";
                      > > > > > var mySchema = ["ResultSet.Result","keyword"]; //["?", "|"];
                      > > > > > //["ResultItem", "KeyDataField"];
                      > > > > > var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);
                      > > > > >
                      > > > > >
                      > > > > > // Increase the cache size
                      > > > > > //myDataSource.maxCacheEntries = 60
                      > > > > >
                      > > > > > // Match case sensitivity
                      > > > > > myDataSource.queryMatchCase = false;
                      > > > > >
                      > > > > > // Match results that *contain* the query string as well as
                      results
                      > > > > > that start with query string
                      > > > > > myDataSource.queryMatchContains = false;
                      > > > > >
                      > > > > > // Match results of query strings that are *subsets* of the
                      current
                      > > > > > query string
                      > > > > > // myDataSource.queryMatchSubset = true;
                      > > > > >
                      > > > > > // Will now send http://url?key=foo
                      > > > > > myDataSource.scriptQueryParam = "key";
                      > > > > >
                      > > > > > YAHOO.widget.AutoComplete.prototype.formatResult =
                      > > > > > function(aResultItem, sQuery) {
                      > > > > > var sResult = aResultItem[0];
                      > > > > > if(sResult) {
                      > > > > > return sResult;
                      > > > > > }
                      > > > > > else {
                      > > > > > return "";
                      > > > > > }
                      > > > > > };
                      > > > > > var myAutoComp = new
                      > > > > > YAHOO.widget.AutoComplete('keywordInput','searchContainer',
                      > > > > myDataSource);
                      > > > > > // comas may delimited queries...
                      > > > > > myAutoComp.delimChar = ",";
                      > > > > > // Require user to type at least 1 characters before triggering
                      > > a query
                      > > > > > myAutoComp.minQueryLength = 1;
                      > > > > > // Container will expand and collapse vertically
                      > > > > > myAutoComp.animVert = false;
                      > > > > > // Container will expand and collapse horizontally
                      > > > > > myAutoComp.animHoriz = false;
                      > > > > >
                      > > > >
                      > > > >
                      > > > >
                      > > > >
                      > > > >
                      > > > >
                      > > > >
                    Your message has been successfully submitted and would be delivered to recipients shortly.