I have a rather strange issue. When I have nortan popup blocker disabled, there are no problems. However, I expect my target audience to have security system such as nortan security. So let me tell you what happens when the popup blocked is enabled, and I hope there is a solution. First, nortan pop-up blocker inserts the following code above my line of code calling a javascript file. I read on the internet that this is normal for the popup blocker to insert code above the first script tag. <script language="JavaScript"> <!-- function SymError() { return true; } window.onerror = SymError; var SymRealWinOpen = window.open; function SymWinOpen(url, name, attributes) { return (new Object()); } window.open = SymWinOpen; //--> </script> <script type="text/javascript" src="../javascript/createProject.js"></script> Code (markup): The strange part is that I have code below the javascript file call. Something like this... <script type="text/javascript"> <cfoutput>#ToScript(catIDList, "catIDList")#</cfoutput> <cfoutput>#ToScript(subcatIDList, "subcatIDList")#</cfoutput> etc... </script> Code (markup): All this code does is convert a coldfusion array into a javascript array. When nortan pop-up blocker is enabled, it actually deletes this code! Furthermore, I know how to turn javascript on and off. I have tried this in both IE7 and Firefox. I have a noscript tag that displays further down the page when the popup blocker is enabled, even when javascript is enabled. If I swap the scripts, making the toScript calls above the createProject.js file, the noscript acts normal. Lastly, nortan popup blocker inserts the following code at the bottom of the page: <script language="JavaScript"> <!-- var SymRealOnLoad; var SymRealOnUnload; function SymOnUnload() { window.open = SymWinOpen; if(SymRealOnUnload != null) SymRealOnUnload(); } function SymOnLoad() { if(SymRealOnLoad != null) SymRealOnLoad(); window.open = SymRealWinOpen; SymRealOnUnload = window.onunload; window.onunload = SymOnUnload; } SymRealOnLoad = window.onload; window.onload = SymOnLoad; //--> </script> Code (markup): I have read that is normal though. If anybody has any information to help solve this, it will be GREATLY APPRECIATED as I have been pulling my hair out for hours Thanks in advance!!! Sincerely, Travis Walters
I placed <script> tags around each toScript call so it would output something like this <script type="text/javascript">catIDList = new Array(); catIDList[0] = 2; catIDList[1] = 5; catIDList[2] = 2; catIDList[3] = 1; catIDList[4] = 5; catIDList[5] = 5; catIDList[6] = 2; catIDList[7] = 2; catIDList[8] = 5; catIDList[9] = 5; catIDList[10] = 2; catIDList[11] = 1; catIDList[12] = 5; catIDList[13] = 1; catIDList[14] = 1; catIDList[15] = 1; </script> <script type="text/javascript">subcatIDList = new Array(); subcatIDList[0] = 76; subcatIDList[1] = 100; subcatIDList[2] = 77; subcatIDList[3] = 66; subcatIDList[4] = 99; subcatIDList[5] = 97; subcatIDList[6] = 104; subcatIDList[7] = 105; subcatIDList[8] = 96; subcatIDList[9] = 103; subcatIDList[10] = 78; subcatIDList[11] = 68; subcatIDList[12] = 95; subcatIDList[13] = 94; subcatIDList[14] = 65; subcatIDList[15] = 70; </script> <script type="text/javascript">subcatNameList = new Array(); subcatNameList[0] = "Application Development"; subcatNameList[1] = "Copywriting"; subcatNameList[2] = "Database Programming"; subcatNameList[3] = "Ecommerce Websites"; subcatNameList[4] = "Editing Documents"; subcatNameList[5] = "Essay Writing"; subcatNameList[6] = "Game Programming"; subcatNameList[7] = "Handhelds & PDAs"; subcatNameList[8] = "Legal Documents"; subcatNameList[9] = "Other Writing"; subcatNameList[10] = "Programming Languages"; subcatNameList[11] = "SEO & SEM"; subcatNameList[12] = "Translation"; subcatNameList[13] = "Web Design"; subcatNameList[14] = "Web Development"; subcatNameList[15] = "Web Programming"; </script> Code (markup): The only difference is before all the arrays were grouped into one <script> </script> tag. Why does this work?