Hi,
I have this code, which is working ok. The only thing is that I want to open the link in the infobubble in the map in a new window . COuld anyone help with this please?

<?php
         if ($page == 0)   {
              $marker_text="<a href=\"$node->url\">$node->path</a><br/> ".$location['city']."<br/>Locatie slechts ter indicatie";
         } else {
             if ( ($location['latitude'] != 0) && ($location['longitude'] != 0)  ) {

             
               $marker_text="<a href=\"$node->url\">$node->path</a><br/>".$location['city']."<br/>Locatie slechts ter indicatie";
               print gmap_simple_map($location['latitude'], $location['longitude'], '', $marker_text, 5, '400px', '250px', true,''); 
             }
         }      
     ?>

Tried the following in $marker_text, but it is not working:
Tried 'target=\"_blank\"

$marker_text="<a href=\"$node->url \target=\"_blank\"">$node->path</a><br/>".$location['city']."<br/>Locatie slechts ter indicatie";

Thanks for helping me!
greetings, Martijn

Comments

summit’s picture

Hi could this help.. http://drupal.org/node/333118#comment-2258524
Will try it out..
NOPE: marker-url is still opening in same window, not in a new browser window..
greetings, Martijn

summit’s picture

Status: Active » Fixed

Hi,

Got it fixed by putting blank in front of the url.
See code:

<?php
         if ($page == 0)   {
              $marker_text="<a target=\"_blank\" href=\"$node->url\">$node->path</a><br/> ".$location['city']."<br/>Klik hierboven voor website";
         } else {
             if ( ($location['latitude'] != 0) && ($location['longitude'] != 0)  ) {

             
               $marker_text="<a target=\"_blank\" href=\"$node->url\">$node->path</a><br/>".$location['city']."<br/>Klik hierboven voor website";
               print gmap_simple_map($location['latitude'], $location['longitude'], '', $marker_text, 5, '400px', '250px', true,''); 
             }
         }      
     ?>

greetings, Martijn

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Apnba’s picture

Can you tell us what is the name of the file you fixed?

Thanks.

summit’s picture

Hi, I added this code to the node-[nodetype].tpl.php which shows the map inside the node because of above code.
greetings, Martijn

Apnba’s picture

Thank you very much.