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

21717Re: [ydn-javascript] DataSource Using URL w/ Query Parameters

Expand Messages
  • Satyam
    Dec 3, 2007
      It is better to place the query arguments in the configuration options of
      the DataTable constructor, in the fourth argument

      var myDataTable = new
      YAHOO.widget.DataTable(container,myColumnDef,myDataSource,{initialRequest:'id=0&group=ProverME'});

      In that way, if you reuse the DataSource for server-side paging, sorting or
      just refreshing the data from the database, the URL stored in the DataSource
      does not include the arguments for an initial request, which might not be
      suitable for further requests. Besides, if you use POST requests, having
      the URL split like this will put the arguments in the post data.
      Nevertheless, I'm surprised that you won't get the arguments on the server
      side. Where you looking for them along the post data? They wouldn't be
      there even if you set the connection to post because you explicitly placed
      them in the query string.

      Satyam


      ----- Original Message -----
      From: "Randall R Schulz" <rschulz@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Monday, December 03, 2007 12:14 AM
      Subject: [ydn-javascript] DataSource Using URL w/ Query Parameters


      > Hi,
      >
      > After this example in Satyam's tutorial blog
      > (<http://yuiblog.com/blog/2007/09/12/satyam-datatable/>):
      >
      > var myDataSource = new YAHOO.util.DataSource("http://url/datafeed.php?");
      >
      >
      > I used this call in my code:
      >
      > var myDataSource = new
      > YAHOO.util.DataSource("/tgi/settings/groupSettings?id=0&group=ProverME")
      >
      >
      > But the URL submitted does not include the query parameters.
      >
      > What's am I doing wrong?
      >
      >
      > Randall Schulz
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG Free Edition.
      > Version: 7.5.503 / Virus Database: 269.16.13/1165 - Release Date:
      > 02/12/2007 20:34
      >
      >
    • Show all 10 messages in this topic