Webmastersite.net
Register Log In

Executing Java Script in wrapper
doesn't work

Comments on Executing Java Script in wrapper

LotusE
Beginner

Usergroup: Customer
Joined: Sep 05, 2005

Total Topics: 4
Total Comments: 6
LotusE
Posted Mar 15, 2006 - 8:29 AM:

Hi all,

I've made a custom wrapper for one category and I've put the following code in it (it's a banner exchange script):

<script language="JavaScript" type="text/javascript" src="templates/default/terra.js"></script>

So I'm referring to an external js-file, which contains the following data:

<script language='JavaScript' type='text/javascript'
src='http://www.terraristik.com/phpads/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

document.write ("<" + "script language='JavaScript'
type='text/javascript' src='");
document.write ("http://www.terraristik.com/phpads/adjs.php?n
<http://www.terraristik.com/phpads/adjs.php?n> =" + phpAds_random);
document.write ("&what=zone:6");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a
href='http://www.terraristik.com/phpads/adclick.php?n=adf0b9ff'
target='_blank'><img
src='http://www.terraristik.com/phpads/adview.php?what=zone:6&n=adf0b9ff
' border='0' alt=''></a></noscript>

Apparently, the javascript won't execute when I integrate it in WSN Links.

The file permissions are set to 775 for the custom wrapper and the js-file. The js-file is in the right directory, so is the wrapper (I've added the word 'test' in the html-code and that does appear on my screen).

What could be the problem?

Thanks in advance!

Cheers

Steve
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 16, 2006 - 9:48 AM:

Would that really be the right format for an external javascript? I'm not a javascript expert but it would seem to me that having the declarations in the external file would break things.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.