No need to destroy the dataset - just leave it for when you next want to make a 
new request.

//first request
var tempData = new LzDataset();
tempData.setSrc(data.getSrc());
tempData.setQueryString(p);
tempData.doRequest();

//subsequent requests
tempData.setSrc(data.getSrc());
tempData.setQueryString(p);
tempData.doRequest();

A better way to do this might be to use the dataset tag to create a set that 
awaits your requests. Then just route all your queries through that, rather 
than creating the dataset with script as and when you need to make a request.

So you'd put this tag shortly after your opening <canvas> tag:

<dataset name = "tempData" />

Then whenever you need to do your request - 

<method event = "onclick">
  tempData.setSrc(your/src/here);
  tempData.setQueryString(p);
  tempData.doRequest();
</method>

(onclick only an example - adapt this to whatever you like)

Hope that helps.

Nick

 
On Monday, April 10, 2006, at 09:01AM, Robin <[EMAIL PROTECTED]> wrote:

>When I want to send a request to the server, but don't care about the result
>(because I'm just telling it some new data or something), I've been doing this
>kind of thing:
>
>var tempData = new LzDataset();
>tempData.setSrc(data.getSrc());
>tempData.setName("temp");
>tempData.setQueryString(p);
>tempData.doRequest();
>tempData.destroy();
>
>however, if I do this more than once, I get a message:
>WARNING: A dataset already exists with the name 'localdata': «LzDataset#5|
><temp><ol....
>Is this a problem, and is there any way to stop it happening?
>
>Thanks, Robin.
>_______________________________________________
>Laszlo-user mailing list
>[email protected]
>http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
>

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to