The app is asp.net, with some javascript. I have a JS file that looks for an array and creates a news link that fades in and out, rotating through my array. They array is dynamicly build in an asp.net/vb.net webcontrol and looks like this:
Then I add in the JS file like this:
As you can tell this will display company news that is populated from a SQL database. The problem I'm having is getting the dynamic array in my set of code to be read in my JS file. I get 2 errors "nNews is not defined" and "Error: expected';' Line 139". What am I doing wrong???
The JS file works fine if I hard code the array and just add it into my web control.
Jim
What doesn't kill you makes you stronger.
Code:
<SCRIPT language="javascript" type="text/javascript">
nNews=new Array()
nNews[0]=New Array()
nNews[0] ["text"]="New Organization"
nNews[0] ["link"]="#"
nNews[1]=New Array()
nNews[1] ["text"]="Employee Purchase Program"
nNews[1] ["link"]="#"
nNews[2]=New Array()
nNews[2] ["text"]="Pre-Tax Form"
nNews[2] ["link"]="#"
</SCRIPT>
Then I add in the JS file like this:
Code:
<script src="reminder.js"language="javascript"></script>
As you can tell this will display company news that is populated from a SQL database. The problem I'm having is getting the dynamic array in my set of code to be read in my JS file. I get 2 errors "nNews is not defined" and "Error: expected';' Line 139". What am I doing wrong???
The JS file works fine if I hard code the array and just add it into my web control.
Jim
What doesn't kill you makes you stronger.