Jump to content

iframe and url


innervisions

Recommended Posts

Hi

 

on my site, i am using an iframe for google maps. When the map comes up it shows markers with information on - part of which is a "clickable" link.

 

Problem is that the url opens in the iframe and i want it to open in a new window coz it goes to a completely different site.

 

I tried putting the

 

target=_blank

 

in different parts of the code, but it just seems to stop everything from working and my google map vanishes !

 

HERES THE LINE OF CODE THAT I THINK I NEED TO CHANGE

 

}

if(v.website != '') {

content_string += "<p class='web'>Website: <a href='"+v.website+"'>"+v.website+"</a></p>";

}

 

Can anyone help? - i just want it to open a new window when people click on the hyperlink in the iframe - any suggestions please

 

Brain

 

Link to comment
Share on other sites

This isn't PHP, it's actually JavaScript so you should have posted it in that section.

 

Try using a different approach with your quotation marks:

 

if(v.website != '')
{
    content_string += '<p class="web">Website: <a href="' + v.website + '" target="_blank">' + v.website + '</a></p>';
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.