Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > JavaScript and CSS

JavaScript and CSS Extensible Markup Language, Java Script, and CSS questions here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-2008, 09:35 PM
Learning Programmer
 
Join Date: Oct 2007
Posts: 56
Credits: 0
Rep Power: 5
twalters84 is on a distinguished road
Default Nortan Popup Blocker + JavaScript Issue

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>
The strange part is that I have code below the javascript file call. Something like this...

Code:
<script type="text/javascript">
<cfoutput>#ToScript(catIDList, "catIDList")#</cfoutput>
<cfoutput>#ToScript(subcatIDList, "subcatIDList")#</cfoutput>
etc...
</script>
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:

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>
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-10-2008, 11:33 AM
Jordan's Avatar   
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 10,944
Last Blog:
Artificial Intelligenc...
Credits: 1
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: Nortan Popup Blocker + JavaScript Issue

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
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-11-2008, 04:41 AM
Learning Programmer
 
Join Date: Oct 2007
Posts: 56
Credits: 0
Rep Power: 5
twalters84 is on a distinguished road
Default Re: Nortan Popup Blocker + JavaScript Issue

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>
I changed this a bit so I had a <script> tag around each ToScript function.

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>
On the actually page, the difference is between..

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 &amp; PDAs";
subcatNameList[8] = "Legal Documents";
subcatNameList[9] = "Other Writing";
subcatNameList[10] = "Programming Languages";
subcatNameList[11] = "SEO &amp; SEM";
subcatNameList[12] = "Translation";
subcatNameList[13] = "Web Design";
subcatNameList[14] = "Web Development";
subcatNameList[15] = "Web Programming";
</script>
And the following code:

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 &amp; PDAs";
subcatNameList[8] = "Legal Documents";
subcatNameList[9] = "Other Writing";
subcatNameList[10] = "Programming Languages";
subcatNameList[11] = "SEO &amp; SEM";
subcatNameList[12] = "Translation";
subcatNameList[13] = "Web Design";
subcatNameList[14] = "Web Development";
subcatNameList[15] = "Web Programming";
</script>
Of course, I have a few other arrays bunched in there.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-11-2008, 05:47 AM
Learning Programmer
 
Join Date: Oct 2007
Posts: 56
Credits: 0
Rep Power: 5
twalters84 is on a distinguished road
Default Re: Nortan Popup Blocker + JavaScript Issue

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>
If anybody knows the reason why it acts funny, I would love to know. I have wasted enough time on it as it is

Thanks again.

Sincerely,
Travis Walters
admin@codebuyers.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:41 PM.

Contest Stats

orjan ........ 42
WingedPanther ........ 28
Turk4n ........ 16
roboticforest ........ 11
RobotGymnast ........ 6
Logan ........ 5
Andreilp ........ 2
dman4real ........ 2
techker ........ 2
Max.89 ........ 2

Contest Rules

CodeCall Goal

Goal #1: 1,000 Blogs
Goal #2: 1,000 Wiki Pages
Complete: 18%, 20%

Bounty

Prize: CodeCall Travel Mug
Requirement: Blogs/WiKi
Description: Click

Ads