EzPortal - Portal Software for Forums

EzPortal Forums => Support => Topic started by: newb on November 29, 2008, 10:34:38 am

Title: Where do I put a .js file that I'm referencing in an EZ Block?
Post by: newb on November 29, 2008, 10:34:38 am
I've got some html in an EZBlock and I'm referencing a .js file. But I can't figure out where I'm supposed to put the .js file. ???

I've tried using an absolute path, but it didn't seem to work.
Title: Re: Where do I put a .js file that I'm referencing in an EZ Block?
Post by: EzPortal on November 29, 2008, 10:44:39 am
Can you show me an example? Of the script
An absolute path should work fine.
Title: Re: Where do I put a .js file that I'm referencing in an EZ Block?
Post by: newb on November 29, 2008, 12:42:38 pm
html in the EZBlock:
Code: [Select]
<HTML>
<HEAD>
<script src="http://www.mysite.com/links/linklist.js"></script>
</HEAD>
<BODY>

<script LANGUAGE = "JavaScript">
</SCRIPT>

</BODY>
</HTML>

JS:
Code: [Select]
function makeArray(len) {
for (var i = 0; i < len; i++) this[i] = null;
this.length = len;
}

ideas = new makeArray(3);
ideas[0] = "<a href=\"http://www.google.com\">Google</a>";
ideas[1] = "<a href=\"http://www.yahoo.com\">Yahoo!</a>"
ideas[2] = "<a href=\"http://www.Reuters.com\">Reuters</a>"


function rand(n) {
seed = (0x015a4e35 * seed) % 0x7fffffff;
return (seed >> 16) % n;
}
var now = new Date()
var seed = now.getTime() % 0xffffffff
Title: Re: Where do I put a .js file that I'm referencing in an EZ Block?
Post by: EzPortal on November 29, 2008, 02:42:36 pm
That code that you have right right now will not show anything.
Are you trying to do random links or what?
Title: Re: Where do I put a .js file that I'm referencing in an EZ Block?
Post by: newb on November 29, 2008, 10:57:43 pm
Yes, random links and then later random affilliate links w/ pictures.