|
||||||
| JavaScript and CSS Extensible Markup Language, Java Script, and CSS questions here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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. Code:
<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:
<script type="text/javascript"> <cfoutput>#ToScript(catIDList, "catIDList")#</cfoutput> <cfoutput>#ToScript(subcatIDList, "subcatIDList")#</cfoutput> etc... </script> 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: Code:
<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>
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 |
| Sponsored Links |
|
|
|
|||||
|
I may have missed it but I read your entire post, twice. What is your problem exactly? I don't believe you ever state it.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
|
|||
|
Hey there,
I did a bit more research on the issue. The issue has to do with some of my code disappearing when nortan pop-up blocked is enabled. Remember how I said I had the following code: Code:
<script type="text/javascript"> <cfoutput>#ToScript(catIDList, "catIDList")#</cfoutput> <cfoutput>#ToScript(subcatIDList, "subcatIDList")#</cfoutput> etc... </script> Code:
<script type="text/javascript"><cfoutput>#ToScript(catIDList, "catIDList")#</cfoutput></script> <script type="text/javascript"><cfoutput>#ToScript(subcatIDList, "subcatIDList")#</cfoutput></script> <script type="text/javascript"><cfoutput>#ToScript(subcatNameList, "subcatNameList")#</cfoutput></script> <script type="text/javascript"><cfoutput>#ToScript(SUBCATEGORY_LIST.RecordCount, "subCount")#</cfoutput></script> <script type="text/javascript"><cfoutput>#ToScript(subcatIDList2, "subcatIDList2")#</cfoutput></script> <script type="text/javascript"><cfoutput>#ToScript(skillIDList, "skillIDList")#</cfoutput></script> <script type="text/javascript"><cfoutput>#ToScript(skillNameList, "skillNameList")#</cfoutput></script> <script type="text/javascript"><cfoutput>#ToScript(SKILL_LIST.RecordCount, "skillCount")#</cfoutput></script> Code:
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; 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; 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:
<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> However, the later case causes the code to display in the source code. So the later case causes the page to be more responsive, but it does not totally fix the problem. There is an array I did not show on this page that has over 200 elements. If my theory is correct, breaking the array up into multiple <script> tags may fix the problem. This makes no sense to me though. Why would the later case be more responsive and make the code display when nortan pop-up blocker is enabled. When it is off everything works fine regardless of how many <script> tags there are. It makes no sense to me at all :S Thanks for any help. Sincerely, Travis Walters |
|
|||
|
Well, I have decided I do not know what the heck is going on with nortan popup blocker and javascript on the page.
I do know that I have a really nice non-javascript version of the page available. I figured if I can determine if a user has the popup blocker enabled, then I can transfer the user to the non-javascript version of the page. This was pretty easy to do since nortan inserts their own code onto the webpage. My solution was as follows: Code:
Well, I have decided I do not know what the heck is going on with nortan popup blocker and javascript on the page.
I do know that I have a really nice non-javascript version of the page available. I figured if I can determine if a user has the popup blocker enabled, then I can transfer the user to the non-javascript version of the page.
This was pretty easy to do since nortan inserts their own code onto the webpage. My solution was as follows:
<script>
if(typeof SymWinOpen == "function")
{
this.location.href = 'create-project2_2.cfm?projectID=<cfoutput>#URL.projectID#</cfoutput>';
}
</script>
![]() Thanks again. Sincerely, Travis Walters admin@codebuyers.com |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| John | ........ | 223.00000 |
| dargueta | ........ | 168.00000 |
| Xav | ........ | 164.00000 |
| gaylo565 | ........ | 18.00000 |
| WingedPanther | ........ | 15.00000 |
| |pH| | ........ | 15.00000 |
| Johnnyboy | ........ | 3.00000 |
| navghost | ........ | 1.00000 |
Goal: 100,000 Posts
Complete: 65%