innervisions Posted September 24, 2010 Share Posted September 24, 2010 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 Quote Link to comment Share on other sites More sharing options...
Chris92 Posted September 24, 2010 Share Posted September 24, 2010 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>'; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.