PDA

View Full Version : need help with external linking



chuco61
03-25-2009, 10:17 PM
UGH! Help! i have an iframe on index.asp (i know i know iframes! but i have to use it) calling up file.asp within file.asp i have a flickr script calling my photo stream using this

<div id="flickrBadgeImage1Div" style="width: 257px; margin-left:auto; margin-right:auto">
<script type="text/javascript" src=
"http://www.flickr.com/badge_code.gne?nsid=36699360%40N05&count=12&display=latest&name=0&size=square&raw=1" >
</script>
</div>

however when i click a photo it loads in the iframe i want it loaded in a new window. any ideas??!!

i tried this, to no avail
<script type='text/javascript'>
var flickrBadgeImage1Div
= document.getElementById('flickrimg1');
var a = flickrBadgeImage1Div.firstChild;
a.setAttribute('target', '_blank');
</script>

jscheuer1
03-26-2009, 02:35 AM
Here is what I would try - whatever page has this code on it:



<div id="flickrBadgeImage1Div" style="width: 257px; margin-left:auto; margin-right:auto">
<script type="text/javascript" src=
"http://www.flickr.com/badge_code.gne?nsid=36699360%40N05&count=12&display=latest&name=0&size=square&raw=1" >
</script>
</div>

In the head of that page, put this tag:


<base target="_blank">

Now this should make all links on that page open in new windows. If you have other links on that page that you want to open in the same window, use target _self, ex:


<a href="whatever.htm" target="_self">Whatever</a>