On Sep 26, 2:30 pm, Harshana85 <[email protected]> wrote:
> Hey Rossko Thank you very much for your reply.
>
> There is a one problem again..
> In my info window link I am suppose to call a php script passing with
> some parameters..like following,
>
> var html='<a href="busprofile.php?id="+id+ >click here <\/a>';  // id
> is a javascript variable

This is a basic Javascript question, isn't it; it's not really related
to maps.

You need to take the id out of your html='...' string so that
Javascript can use it as a number. First, write the link as you might
want it to look:

busprofile.php?id=1

Then wrap the a tag around it:

<a href="busprofile.php?id=1">click here</a>

Then assign that string to the html variable, with different quotes:

var html='<a href="busprofile.php?id=1">click here</a>'

Then make that into three strings:

var html='<a href="busprofile.php?id='+'1'+'">click here</a>'

Then replace the string containing the number with the Javascript
variable:

var html='<a href="busprofile.php?id='+id+'">click here</a>'

Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to