dfowler Posted July 9, 2008 Share Posted July 9, 2008 Hey guys, I'm having a problem and I'm not sure why. I have one js file that is hosted on another server. This file is modified by another source, and basically they are setting a variable as true or false. The contents are as follows: var II_gAgentsAvail = false; Then I have a second js file hosted locally. I need to read that variable and depending on whether it is false or not execute a script. So first, I included the other js file: <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="----location of first .js file----"></SCRIPT> Then I've tried: if(II_gAgentsAvail == false) { document.write('False'); } Just to test, but I'm not getting anything. Does anybody know what I am doing wrong? Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 10, 2008 Share Posted July 10, 2008 try alerting the var to see if it has a value.. include the file then say alert(II_gAgentsAvail); I betting there is not a value or the value is not false Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.