Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 8th, 2005, 12:49 PM
Registered User
 
Join Date: Jul 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Active Content Problem NOT on local hard drive

I have an issue with Internet Explorer 6.0.2900.218, SP2, 128-bit cipher strength not rendering content in a frameset from an SSL enabled web server. This server happens to be my client’s server and is where the product will reside. I have not been able to reproduce this issue on two other servers running SSL so I can’t imagine what this particular server’s issues are. Finally, the problem is not experienced when using earlier versions of Internet Explorer, or Opera or Firefox.

The frameset is created in index.html. The frameset is designed as follows:

<FRAMESET cols="197,*" frameborder="NO" border="0" onload="populate();" onunload="exitCourse('incomplete');">
  <FRAME name="nav" title="navigational links frame" src="leftNav2.html" scrolling="no" marginwidth="0" marginheight="0">
    <FRAMESET rows="52px,*" frameborder="NO" border="0" >
                      <FRAME name="logo" title="top frame" src="topFrame.html" scrolling="no" marginwidth="0" marginheight="0">
                      <FRAME name="content" title="contents frame" src="blank.html" scrolling="no" marginwidth="0" marginheight="0">
    </FRAMESET>
</FRAMESET>

  Lessons.js contains multiple functions that handle navigation, look-feel and pop-up window generation. It is referenced as follows in the header section of index.html

<script language="JavaScript" src="scripts/lesson.js"></SCRIPT>

The problem is that no files can be placed in the “content” frame using JavaScript when running on one server. The server is Apache/2.0.48 (Unix) mod_jk2/2.0.2 and is using SSL. Index.html correctly populates the “nav” frame and the “logo” frame. The “content” frame initially is populated by blank.html which is as designed. Some content in the “nav” and “Logo” frames are dynamically generated using JavaScript. This is correctly displayed, so the JavaScript is being read correctly.

Using the debugger in IE, I have identified what lines of code are at the core of the problem.

Index.html’s body tag calls the function populate() using the onLoad event. The function populate() resides in lesson.js.

function populate(){
    bottom=URLprefix + pageArray[0];
parent.content.location.href = bottom;
loadPage();
}

var URLprefix = “https://*********/scorm-content/***/****/modA/”;

pageArray = new Array (
    "intro.htm",
    "1000.htm",
        ""
)
Originally, I did not have the var URLPrefix but I put that in just to see if having a complete URL would correct the problem – it didn’t.

The line in populate() causing the problem is

parent.content.location.href = bottom;.

I get an “Access Denied” error here.

I get other “Access Denied” errors in other functions at this line

var url = parent.content.document.URL; .

What is the issue with trying to access the document.URL and document.href? Can web servers shut this access off? What is the workaround?

When I set IE6 SP2 Advanced Options to “Allow Active Content to run in files on My Computer”, the problem goes away. This is not an acceptable solution. Besides, the content is delivered via the internet.




Reply With Quote
  #2 (permalink)  
Old July 8th, 2005, 01:01 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Because you are using two different protocols you are creating a cross domain scripting issue. Have you tried enabling "access data sources across domains" in the relevant security zone?

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #3 (permalink)  
Old July 8th, 2005, 01:38 PM
Registered User
 
Join Date: Jul 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

index.html is called using https: so there is no cross-domain issue. The code works on two other servers running SSL. THe only thing I changed was the URLPrefix variable.

Reply With Quote
  #4 (permalink)  
Old July 12th, 2005, 09:41 AM
Registered User
 
Join Date: Jul 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, it works all of a sudden. No changes to the code and the server admin says nothing changed. Go figure.

Reply With Quote
Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable Active Content in Browser setting taraprasad Pro JSP 0 February 1st, 2008 05:41 AM
Message Box on USB flash disk/hard drive insertion arif_1947 VS.NET 2002/2003 0 October 7th, 2004 03:06 AM
Setting path to local "C" drive for crystal report rajupusapati Crystal Reports 2 June 17th, 2004 11:47 AM
Doesn't recognize hard drive linuxboy Linux 0 October 31st, 2003 02:39 PM
Search engine that search through local drive! wenzation Classic ASP Basics 0 August 26th, 2003 09:15 PM



All times are GMT -4. The time now is 08:33 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.