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

17687Re: [ydn-javascript] Re: Links in a DataTable

Expand Messages
  • Satyam
    Sep 4 11:57 PM
      var myFormatter = function(el, oRecord, oColumn, oData) {

      el.innerHTML = '<a href="page.php?userID=' + oRecord.getData('UserID') +
      '">' + oData + '</a>';

      };

      You assign it as a formatter for the UserName column so the UserName comes
      in the oData argument. The UserID you pick from the record.

      Satyam

      ----- Original Message -----
      From: "sudermatt" <sudermatt@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Wednesday, September 05, 2007 6:52 AM
      Subject: [ydn-javascript] Re: Links in a DataTable


      > OK, I have another question related to this....
      >
      > If I have a column in the my data that contains an ID value, and
      > another column that contains a label.
      >
      > UserID
      > UserName
      >
      > How can I set up the formatter function so that the UserName column
      > displays the UserName as a link to a page sending the UserID
      >
      > viewUser.asp?UserID=xxxxx
      >
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG Free Edition.
      > Version: 7.5.485 / Virus Database: 269.13.3/986 - Release Date: 03/09/2007
      > 9:31
      >
      >
    • Show all 11 messages in this topic