I'd suspect that with the dummy parameter in the URL, that your
webserver is not serving the XML - it's returning a 404 error perhaps?
You can try this structure of code for the GDownloadUrl function:
GDownloadUrl('xmlfiles/'+$xmlFilename, function($response,
$responseCode){
if($responseCode===200){
// process the xml
} else {
GLog.write('Xml query failed with response code: '+$responseCode);
}
});
That should tell you whether the dummy parameter is causing a 404 file
not found error.
Martin.
On 24 Apr, 04:17, Ivan <[email protected]> wrote:
> Hi Larry,
>
> When I use that i get a document.Element is null error
>
> On Apr 23, 12:38 pm, "[email protected]" <[email protected]>
> wrote:
>
> > On Apr 23, 11:17 am, Ivan <[email protected]> wrote:
>
> > > I saw this code when i searched this forum:
>
> > > request.open("GET", url+"&dummy="+Math.random(), true);
>
> > > Is there an implementaion for generating an xml file with php
>
> > It has nothing to do with php. If I read your post correctly, your
> > question is whether or not you can use the same "trick" with
> > GDownloadUrl.
>
> > > GDownloadUrl("php/phpsqlajax.php", function(data){ }
>
> > url = "php/phpsqlajax.php"
>
> > This is the equivalent:
> > GDownloadUrl("php/phpsqlajax.php"+"&dummy="+Math.random(), function
> > (data){ }
>
> > -- Larry
>
> > > On Apr 22, 7:12 pm, "[email protected]" <[email protected]>
> > > wrote:
>
> > > > On Apr 22, 6:06 pm, Ivan <[email protected]> wrote:
>
> > > > > I am using
>
> > > > > GDownloadUrl("php/phpsqlajax.php", function(data){
>
> > > > > }
>
> > > > > This will load markers from axmlfile after quering a database.
>
> > > > > However thexmlseems to get cached in memory.
>
> > > > > If i call the function twice after updating the database it doesnt
> > > > > show the next marker.
>
> > > > You are probably using IE. It likes to keep files in the cache. You
> > > > need to add either a random number or a function of the date to the
> > > > URL. Search the group for examples.
>
> > > > -- Larry
>
> > > > > On Apr 7, 12:12 pm, Rossko <[email protected]> wrote:
>
> > > > > > > ??
>
> > > > > > What? Were you expecting some comments or suggestions about the way
> > > > > > your webpage does things?
> > > > > > We can't see your webpage ...
> > > > > >
> > > > > > http://groups.google.com/group/Google-Maps-API/web/suggested-posting-...
>
> > > > > > cheers, Ross K- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---