Thank you for your help. I apologise for asking some pretty basic
questions repeatedly. With no real training or experience in coding
its amazing I've gotten as far as I have to be honest, as I find so
much confusing!
The problem with the above examples is that for some reason I could
not get the <div onclick... to work, and ended up passing the value
through an html link:
var delhtml = 'Value: '+value+'<BR><BR>Score: '+scores+'<BR><BR><a
href="edit.php?markerid='+markno+'">Edit value and score</a>
<BR><BR><a href="delete.php?markerid='+markno+'">Delete Marker</a> ';
With my limited coding logic I figured a modified version of the popup
code I have used in the top of my page would also work, and so tried
this for the delete link:
<a href="delete.php?markerid='+markno+'" onclick="return
deletepopup('delete.php')>Delete Marker</a>
The problem is that I get a "missing ; before statment" error pointing
to just before the onclick part. I was unsure whether I had simply
gotten my quotes wrong, or whether I was trying to use some code that
wasn't allowed in the infowindow.
Thanks again for your help.
Chris
On Mar 24, 10:40 am, Rossko <[email protected]> wrote:
> > On a related note, does the API infowindow allow for using javascript
> > within it?
>
> From previous posts,
> var html = '<div onclick="deleteMarker(' + marker.myMarkerID +
> ')">DELETE</div>';
> marker.openInfoWindowHtml(html);
>
> The infowindow contains javascript - deleteMarker(whatever) is a call
> to a javascript function.
>
> Also from previous posts
> function deleteMarker(id) {
> var url = 'somePhpScript.php?task=delete&markerId=' + id;
> GDownloadUrl(url,function(){
> // Do something with the response
> })
>
> If want "do something" to become something like "refresh the map",
> make it so.
--
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.