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

RE: [ydn-javascript] Datable issue on IE 7 (7.0.5730.11)

Expand Messages
  • Mohana Ramaratnam
    Hello Satyam,Thanks for your prompt response.The server returns an XML in which the nodes that I want to display are not as per what YUI Datasource is used
    Message 1 of 3 , Sep 2, 2008

      Hello Satyam,


      Thanks for your prompt response.


      The server returns an XML in which the nodes that I want to display are not as per what YUI Datasource is used to parsing. So I had to write my own parseXMLData method. I use the column def and the formatter for the delete cell.


      On click of the delete cell, the server gets a DELETE post for the row. I know that this is successful on the server side. On the client side, DT.deleteRow() works and re-renders the table. Now when I click the refresh button (YUI.button):


      a)      On Firefox a connection is made to server and the server returns the XML document with the node removed.

      b)      On IE, a connection is NOT made to the server and the DT is rendered with the recordset same as before the delete. Its somehow as if some Boolean is being checked (outside the scope of my code) to see if the DT/DS needs to invoke a sendRequest or not and on IE the sendRequest is not sent.


      I have attached the code that I am using.  The file pipelineMgmt.js contains the code where DT and DS is being defined. The file xnat_proejctData_summary_pipeline.vm contains the code for the refresh  button.









      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Satyam
      Sent: Tuesday, September 02, 2008 1:01 PM
      To: ydn-javascript@yahoogroups.com
      Subject: Re: [ydn-javascript] Datable issue on IE 7 (7.0.5730.11)


      You are not showing the code to tell the server that the row has been
      deleted. If this works in FF, then that code should be there,
      somewhere. From what you show, you are calling deleteRow on the client
      side which has no way of affecting the server so a refresh would restore
      anything as it was.

      The first suspect when there is something that works in anything but IE
      is a trailing comma in an array or object literal. In IE, this:


      prints 4, all other browsers say 3. This often causes that any loop
      over such an array to fail at the last non-existing element.

      You mention you have extended parseXMLData. It seems this is related to
      providing an extra field for the delete button. You don't need to go to
      such trouble. There can be more column definitions than fields in the
      DataSource. All extra column definitions would required a formatter
      function, which is all you would need to place a button in that cell.
      You don't need to provide actual data from the DataSource to add this
      extra column.

      Also, you don't need to call getTarget on a custom event. That function
      is required for real browser events. With a custom event such as this,
      the target is already resolved for you. You can do:

      var target = ev.target;

      And you don't need to call render after deleteRow.


      mohanakannan9 wrote:

      > Hello,
      > I have a DataTable (DT) which is being populated from a DataSource
      > (DS). I have extended the DS.parseXMLData method. Each row in the DT
      > has a cell which when clicked deletes the row from the DT using the
      > following steps:
      > STEP 1:
      > pipelineDataTable.subscribe('cellClickEvent',function(ev) {
      > var target = YAHOO.util.Event.getTarget(ev);
      > var column = this.getColumn(target);
      > if (column.key == 'delete') {
      > window.pipelineManager.confirmPipelineDelete(target,this);
      > }
      > });
      > STEP 2:
      > confirmPipelineDelete=function(oTarget,oTable){
      > ......
      > oTable.deleteRow(oTarget);
      > oTable.render();
      > .....
      > };
      > When a delete cell is clicked, the row gets deleted and the remaining
      > rows are displayed to the user. I have a button on the page which is
      > like a refresh button to get the data from the server into the DS and
      > render the DT. On IE 7, after a delete has been performed, it looks
      > like the DT->DS.sendRequest is not being invoked. DT gets displayed
      > with the contents before the delete was performed.
      > This works perfectly fine in Firefox.
      > Any clues as to what could be wrong? I am using YUI 2.5.2.
      > Mohana
      > ------------------------------------
      > Yahoo! Groups Links
      > ----------------------------------------------------------
      > No virus found in this incoming message.
      > Checked by AVG - http://www.avg.com
      > Version: 8.0.169 / Virus Database: 270.6.14/1645 - Release Date:
      01/09/2008 7:19

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