pdsok
10-30-2006, 05:23 PM
I am using this script to make a changeable link for multiple pages,
this goes in the pages and all I have to do is edit the file tiger.js
<script src="tiger.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
document.write("<a href=\"" + toppic_link + "\">")
document.write("<img border='0' src='images/toppic.gif' width='461' height='80'>")
document.write("</a>")
//-->
</script>
I then have this in tiger.js, this is my changable link
var toppic_link = "http://www.tstiger.org.uk"
But sometimes I want to open the link in a new window so i would add target="new" onto the end of the var in tiger.js like this
var toppic_link = "http://www.tstiger.org.uk' target='new'"
but it don't work
I know it is something to do with the speech marks and I have tried using ' as I thought that was correct but still no good
any help would be appreciated
thanks
this goes in the pages and all I have to do is edit the file tiger.js
<script src="tiger.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
document.write("<a href=\"" + toppic_link + "\">")
document.write("<img border='0' src='images/toppic.gif' width='461' height='80'>")
document.write("</a>")
//-->
</script>
I then have this in tiger.js, this is my changable link
var toppic_link = "http://www.tstiger.org.uk"
But sometimes I want to open the link in a new window so i would add target="new" onto the end of the var in tiger.js like this
var toppic_link = "http://www.tstiger.org.uk' target='new'"
but it don't work
I know it is something to do with the speech marks and I have tried using ' as I thought that was correct but still no good
any help would be appreciated
thanks