Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Cant generate new URL() Object in Dashcode

As the topic says i im not able to generate a new URL() Object.

like:

var url = new URL();

in Dashcode it says that url is not declared why?

Posted on May 25, 2009 10:32 AM

Reply
4 replies

May 27, 2009 7:44 AM in response to verklixt

I do not know if you will find the following code useful:

// only check if 15 minutes have passed
if ((now - last_updated) > 900000)
{
if (xml_request != null)
{
xml_request.abort();
xml_request = null;
}
xml_request = new XMLHttpRequest();

xml_request.onload = function(e) {xml_loaded(e, xml_request);}
xml_request.overrideMimeType("text/xml");
xml_request.open("GET", feed.url);
xml_request.setRequestHeader("Cache-Control", "no-cache");
xml_request.send(null);
}

Mihalis.

May 28, 2009 3:25 AM in response to Mihalis Tsoukalos

Hello,

Thx for the answer but I think I didnt told you why i need the fetch() method.

The fetch method takes the data(e.g. html) and puts it in a string variable or into a file.

I need this because I want to make a widget(I finished but one feature is missing) which opens a site and tells you how which trains or busses you need.
My Problem is that this site needs detailed information and so you have to choose on the site.
I want to put this choosing into my widget.
As you recognized the idea is like Ajax.
But i dont think that xmlhttprequest will work for my problem.

Is there any other solutions?

Cant generate new URL() Object in Dashcode

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.