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

Error in Connection Object in IE7

Expand Messages
  • asitkatiyar
    Hi, I am trying to update the row in datatable after editing that on clicking the save button. The code which I have written is working fine on firefox and
    Message 1 of 5 , Jan 28, 2009
    • 0 Attachment
      Hi,

      I am trying to update the row in datatable after editing that on
      clicking the save button. The code which I have written is working
      fine on firefox and safari, but does not work on IE7. Even it does not
      show any error message. I have wasted many hours but not able to
      figure it out. I am pasting the "Save" button code here.

      function saveButton(myDataTable){
      var btnSaveRow = new YAHOO.widget.Button("save");
      btnSaveRow.on("click", function(){
      myDataTable.disable();

      var connCallBack =
      {
      success:function(o) {
      var r = YAHOO.lang.JSON.parse(o.responseText);
      if (r.title) {
      var myArray = myDataTable.getSelectedRows();
      var recordSet = myDataTable.getRecordSet();
      for(var i=0; i<myArray.length; i++){
      var rec = recordSet.getRecord(myArray[i]);
      var index = recordSet.getRecordIndex(rec);
      }
      myDataTable.updateRow(index, r.title);

      document.showTitles.reset();
      myDataTable.undisable();
      } else {
      alert("Problem in displaying the data");
      }

      },
      failure:function(o) {
      alert("Can not save the data");
      myDataTable.undisable();
      }

      }

      try{
      YAHOO.util.Connect.asyncRequest(
      'POST',
      '/admin/updatedb/id/'+$F('showId')+'title/'+escape($F('title'))+'/description'+escape($F('description')+'/format/json',
      connCallBack
      );
      }
      catch(e){
      alert("Error");
      myDataTable.undisable();
      }

      }, this, true);
      btnSaveRow.set("disabled", true);
      return btnSaveRow;
      }

      I just added the catch block in this code. This way I can see the
      alert message "Error", but unable to understand why this is happening.
      Any help is appreciated.

      Thanks
    • arambulo81
      I m having a similar problem, but not in the button class. I m trying to use YuiLoader to load up the dependencies for Autocomplete per the ComboBox example in
      Message 2 of 5 , Jan 30, 2009
      • 0 Attachment
        I'm having a similar problem, but not in the button class.

        I'm trying to use YuiLoader to load up the dependencies for
        Autocomplete per the ComboBox example in the Library.

        yuiLoader.yuiLoader(
        "animation,button,connection,autocomplete,datasource", String.format(
        "function(){initComboBox('%s', '%s', '%s', '%s');}", getInitTalkUrl()
        , inputId, containerId, toggleId ) );

        In FF3, it works fine. In IE7, it doesn't make any connection to the
        JS file at all. I've used other YUI components in the same manner
        (calendar, etc) and if it renders in FF3, it works in IE7. At first I
        assuemd it was the Button component, but it wouldn't fire any
        debug/alerts that exist before the Button Render.

        Anyone have an idea of what's causing it to not connect?
      • tssha
        ... Unfortunately, there is nothing I can discern from this report. A reproduction case or complete example code would help greatly. Regards, Thomas
        Message 3 of 5 , Jan 30, 2009
        • 0 Attachment
          --- In ydn-javascript@yahoogroups.com, "arambulo81" <amy.arambulo@...>
          wrote:
          >
          > I'm having a similar problem, but not in the button class.
          >
          > I'm trying to use YuiLoader to load up the dependencies for
          > Autocomplete per the ComboBox example in the Library.
          >
          > yuiLoader.yuiLoader(
          > "animation,button,connection,autocomplete,datasource", String.format(
          > "function(){initComboBox('%s', '%s', '%s', '%s');}", getInitTalkUrl()
          > , inputId, containerId, toggleId ) );
          >
          > In FF3, it works fine. In IE7, it doesn't make any connection to the
          > JS file at all. I've used other YUI components in the same manner
          > (calendar, etc) and if it renders in FF3, it works in IE7. At first I
          > assuemd it was the Button component, but it wouldn't fire any
          > debug/alerts that exist before the Button Render.
          >
          > Anyone have an idea of what's causing it to not connect?

          Unfortunately, there is nothing I can discern from this report. A
          reproduction case or complete example code would help greatly.

          Regards,
          Thomas
        • arambulo81
          We use Tapestry5. Java: @SetupRender void setupRender() { yuiLoader.yuiLoader( animation,button,connection,autocomplete, datasource , String.format(
          Message 4 of 5 , Jan 30, 2009
          • 0 Attachment
            We use Tapestry5.

            Java:
            @SetupRender
            void setupRender() {
            yuiLoader.yuiLoader(
            "animation,button,connection,autocomplete,
            datasource",
            String.format( "function(){initComboBox('%s', '%s',
            '%s', '%s');}", initUrl , inputId,
            containerId, toggleId ) );
            }

            tml:
            <div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
            <div id="tAutoComplete">
            <input id="${inputId}" name="${boxName}"
            type="text" style="${boxStyle}"/>
            <div id="${containerId}"></div>
            <div id="${toggleId}" style="float:right"/>
            <div style="clear:both;height:0px;width:100%" />
            </div>
            </div>

            JS:
            function initComboBox(url, inputid, containerid, toggleid ) {
            alert("*HELLO*");
            inputId = inputid;
            containerId = containerid;
            toggleId = toggleid;
            var onFailure = function( callbackResponse ) {
            alert( "OOPS: " + callbackResponse );
            }
            YAHOO.util.Connect.asyncRequest('GET', url,
            {success:loadTalk,failure:onFailure}, null);
            }

            The alert in the JS's first line never fires in IE7, but it does in FF3.
          • Adam Moore
            This could be a scope problem, but what we really need to see is the code that was generated from your template. -Adam ... --
            Message 5 of 5 , Jan 30, 2009
            • 0 Attachment
              This could be a scope problem, but what we really need to see is the
              code that was generated from your template.

              -Adam

              On Fri, Jan 30, 2009 at 07:51:06PM -0000, arambulo81 wrote:
              > We use Tapestry5.
              >
              > Java:
              > @SetupRender
              > void setupRender() {
              > yuiLoader.yuiLoader(
              > "animation,button,connection,autocomplete,
              > datasource",
              > String.format( "function(){initComboBox('%s', '%s',
              > '%s', '%s');}", initUrl , inputId,
              > containerId, toggleId ) );
              > }
              >
              > tml:
              > <div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
              > <div id="tAutoComplete">
              > <input id="${inputId}" name="${boxName}"
              > type="text" style="${boxStyle}"/>
              > <div id="${containerId}"></div>
              > <div id="${toggleId}" style="float:right"/>
              > <div style="clear:both;height:0px;width:100%" />
              > </div>
              > </div>
              >
              > JS:
              > function initComboBox(url, inputid, containerid, toggleid ) {
              > alert("*HELLO*");
              > inputId = inputid;
              > containerId = containerid;
              > toggleId = toggleid;
              > var onFailure = function( callbackResponse ) {
              > alert( "OOPS: " + callbackResponse );
              > }
              > YAHOO.util.Connect.asyncRequest('GET', url,
              > {success:loadTalk,failure:onFailure}, null);
              > }
              >
              > The alert in the JS's first line never fires in IE7, but it does in FF3.
              >
              >
              > ------------------------------------
              >
              > Yahoo! Groups Links
              >
              >
              >

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