Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript not working on http server

Status
Not open for further replies.

phipm1

Technical User
Jun 6, 2013
9
CA
We have a training course that is created using flash (SWF). Everything was working fine on SUNOne web server we have migrated all our web servers over to HTTP Server. Our training site works fine except for this one course.

When you go to the link to the course module from the index page an additional windows pops up (suppose to run launch.html) and normally the course begins but since we have migrated to HTTP Server the window just is empty, no error codes in the logs files, swf is in mime types.
The launch.html page does have java script in it so I think it may have to do with some setting in the conf file for Javascript but I really don't know where to been to troubleshoot this problems.

Can anyone point me in the right direction of where to start?
 
#####################################################
Include /opt/IBM/WebSphere/HTTPServer/conf/httpd.conf
#####################################################
#
#Listen IP address and Port Number
Listen XXXXXXXX
######### DocumentRoot ############################
#
DocumentRoot "/#
#
<Directory />
Options FollowSymLinks Indexes
AllowOverride None
</Directory>
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/#
#
Options FollowSymLinks Indexes

</Directory>
#
######### DirectoryIndex ############################################
#
DirectoryIndex index.html index.htm launch.html
IndexOptions FancyIndexing VersionSort
#
#
##############MIME TYPES################################################

AddHandler application/x-shockwave-flash .swf


########## Pidfile location,Error and Access Logs #####################
#
PidFile /opt/IBM/WebSphere/HTTPServer/logs/edc/httpd.pid
ErrorLog "|/opt/IBM/WebSphere/HTTPServer/bin/rotatelogs /opt/IBM/WebSphere/HTTPServer/logs/edc/error_%Y-%m-%d-%H 86400 -360"
CustomLog /opt/IBM/WebSphere/HTTPServer/logs/edc/access_log common
CustomLog "|/opt/IBM/WebSphere/HTTPServer/bin/rotatelogs /opt/IBM/WebSphere/HTTPServer/logs/edc/access_%Y-%m-%d-%H 86400 -360" common

LogLevel warn

# The following directives define some format nicknames for use with a CustomLog directive
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
#
###########################################################
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
Alias /icons/ "/opt/IBM/WebSphere/HTTPServer/icons/"

<Directory "/opt/IBM/WebSphere/HTTPServer/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>


####################################################################################
 
Javascript is a client side scripting language, so it would have no effect on the server side. I don't use SWF, so I am not very familiar with configuring the HTTPServer to handle it, but if the other courses are written with it also and work just fine, I don't think it's an issue with the configuring the server for SWF. The most obvious issue to me would be a directory/File naming issue. First thing I would check the case of your the directories and filenames for the links on your index page that open up that course; Apache is case sensitive; i.e. ""/opt/IBM/WebSphere/HTTPServer/icons/Course1.swf" is not the same filepath as "/opt/ibm/websphere/httpserver/icons/course1.swf" to HTTPServer. Check for the same issue on your filepaths in your conf, focusing on the directories specific to the affected course.
 
Neither flash OR javascript are server side technologies, so Apache needs NO configuring to deal with either of them beyond ensuring that the correct MIME headers are sent to the useragent..

Prattaratt said:
Apache is case sensitive;
Nope, Unix/Linux is case sensitive not Apache, if Apache is running on a Windows OS the system is case insnsitive.



Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Thx for the replies.

I put a test page and swf in the same location as the course. It works fine. A launch.html starts the course.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<script language="javascript" src="../scripts/swfobject.js"></script>
<script language="javascript" src="../scripts/cSCORM_Connector.js"></script>
<script language="javascript" src="../scripts/FlashToLMS.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>SaskTel</title>
<style media="screen">
body, div#flashContent, object, embed {
margin: 0;
padding: 0;
border: 0;
background: #ffffff;
}
p {
color: #999999;
font-size: 18px;
font-family: Arial, Helvetica, sans-serif;
text-align: center;
}
</style>
<script language="JavaScript">

var inLMS = true;
var isnmScormAPI = null;

function InitSCO() { // on body load

//window.top.resizeTo(1000, 690);
//window.top.moveTo(0,0);

isnmScormAPI = new cSCORM_Connector(null);
isnmScormAPI.SCOInitialize('');
setTimeout(WaitForSCORMInit, 2000);
}

function WaitForSCORMInit() {
if (!isnmScormAPI.SCOInitialized) {
inLMS = false;
}
WriteFlash();
}

function WriteFlash() {
url=unescape(window.document.location);
modID=url.substring(url.indexOf("=")+1,url.length);
//alert(modID)
var flashCourse = new SWFObject("Main.swf", "course", '1000', '632', '8', "#FFFFFF");
flashCourse.addVariable('ModID', 'M061');
// flashCourse.addVariable('isLocal', isLocal);
flashCourse.write('flashContent');
}
function openCustomWindow(details){
//alert(details)
params = details.split("|")
window.open(params[0],params[1],params[2]);
}
</script>
</head>

<body onload="InitSCO();" onUnload="CommitAndClose();">

<div id="flashContent">
<p>
<br /><br /><br /><br /><br />
Searching for Learning Management System...
</p>
</div>
</body>
</html>
 
Then I would check the link/code that launches the course from the original index page for spelling and case matching. If you can launch the course from a test page then that clearly indicates a problem within the original launching pages code.
 
Prior to migrating to HTTP Server we were on SunONE which resides on the same UNIX box. The course worked fine from SunONE.

The course index.html page contains all the links to the launch html files of the different moduels.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>BEST Module Manager</title>
<script type="text/javascript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<link href="screen.css" rel="stylesheet" type="text/css" media="screen" />
</head>

<body>
<table border="2" align="center" cellpadding="5" cellspacing="0">
<tr>
<td><p><strong>Module</strong></p></td>
<td><p><strong>Title</strong></p></td>
<td><p><strong>Source Folder</strong></p></td>
</tr>
<tr>
<td><p>Pre-Module 01</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M061/courseEngine/launch.html','061','resizable=yes,width=1000,height=630')">Role of a Business Rep</a></p></td>
<td align="right"><p>M061</p></td>
</tr>
<tr>
<td><p>Pre-Module 01</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M062/courseEngine/launch.html','062','resizable=yes,width=1000,height=630')">Identifying a BS&amp;S Customer</a></p></td>
<td align="right"><p>M062</p></td>
</tr>
<tr>
<td><p>Pre-Module 02</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M010/courseEngine/launch.html','010','resizable=yes,width=1000,height=630')">Goal Setting</a></p></td>
<td align="right"><p>M010</p></td>
</tr>
<tr>
<td><p>Pre-Module 02</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M013/courseEngine/launch.html','013','resizable=yes,width=1000,height=630')">QuickLinks</a></p></td>
<td align="right"><p>M013</p></td>
</tr>
<tr>
<td><p>Pre-Module 03</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M01/courseEngine/launch.html','001','resizable=yes,width=1000,height=630')">Network Access</a></p></td>
<td align="right"><p>M01</p></td>
</tr>
<tr>
<td><p>Pre-Module 03</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M066/courseEngine/launch.html','066','resizable=yes,width=1000,height=630')">Classes of Service</a></p></td>
<td align="right"><p>M066</p></td>
</tr>
<tr>
<td><p>Pre-Module 03</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M04/courseEngine/launch.html','004','resizable=yes,width=1000,height=630')">SmartTouch Features</a></p></td>
<td align="right"><p>M04</p></td>
</tr>
<tr>
<td><p>Pre-Module 03</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M03/courseEngine/launch.html','003','resizable=yes,width=1000,height=630')">Business Voice Mail</a></p></td>
<td align="right"><p>M03</p></td>
</tr>
<tr>
<td><p>Pre-Module 03</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M02/courseEngine/launch.html','002','resizable=yes,width=1000,height=630')">Long Distance Solutions</a></p></td>
<td align="right"><p>M02</p></td>
</tr>
<tr>
<td><p>Pre-Module 04</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M022/courseEngine/launch.html','012','resizable=yes,width=1000,height=630')">Business Phones</a></p></td>
<td align="right"><p>M022</p></td>
</tr>
<tr>
<td><p>Pre-Module 05</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M024/courseEngine/launch.html','024','resizable=yes,width=1000,height=630')">Internet Services &amp; Business maxTV &#8212; Dial Up</a></p></td>
<td align="right"><p>M024</p></td>
</tr>
<tr>
<td><p>Pre-Module 05</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M025/courseEngine/launch.html','025','resizable=yes,width=1000,height=630')">Internet Services &amp; Business </a><a href="javascript:;" onclick="MM_openBrWindow('M024/courseEngine/launch.html','024','resizable=yes,width=1000,height=630')">maxTV</a><a href="javascript:;" onclick="MM_openBrWindow('M025/courseEngine/launch.html','025','resizable=yes,width=1000,height=630')"> &#8212; High Speed</a></p></td>
<td align="right"><p>M025</p></td>
</tr>

<tr>
<td><p>Pre-Module 05</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M027/courseEngine/launch.html','027','resizable=yes,width=1000,height=630')">Internet Services &amp; Business </a><a href="javascript:;" onclick="MM_openBrWindow('M024/courseEngine/launch.html','024','resizable=yes,width=1000,height=630')">maxTV</a><a href="javascript:;" onclick="MM_openBrWindow('M027/courseEngine/launch.html','027','resizable=yes,width=1000,height=630')"> &#8212; Optional Business Internet Services</a></p></td>
<td align="right"><p>M027</p></td>
</tr>
<tr>
<td><p>Pre-Module 05</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M028/courseEngine/launch.html','028','resizable=yes,width=1000,height=630')">Internet Services &amp; Business </a><a href="javascript:;" onclick="MM_openBrWindow('M024/courseEngine/launch.html','024','resizable=yes,width=1000,height=630')">maxTV</a><a href="javascript:;" onclick="MM_openBrWindow('M028/courseEngine/launch.html','028','resizable=yes,width=1000,height=630')"> &#8212; Business </a><a href="javascript:;" onclick="MM_openBrWindow('M024/courseEngine/launch.html','024','resizable=yes,width=1000,height=630')">maxTV</a></p></td>
<td align="right"><p>M028</p></td>
</tr>
<tr>
<td><p>Pre-Module 06</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M053/courseEngine/launch.html','053','resizable=yes,width=1000,height=630')">Telephone Systems Overview &#8212; Centrex</a></p></td>
<td align="right"><p>M053</p></td>
</tr>
<tr>
<td><p>Pre-Module 06</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M054/courseEngine/launch.html','054','resizable=yes,width=1000,height=630')">Telephone Systems Overview &#8212; Key Systems</a></p></td>
<td align="right"><p>M054</p></td>
</tr>
<tr>
<td><p>Pre-Module 06</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M055/courseEngine/launch.html','055','resizable=yes,width=1000,height=630')">Telephone Systems Overview &#8212; PBX</a></p></td>
<td align="right"><p>M055</p></td>
</tr>
<tr>
<td><p>Pre-Module 06</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M012/courseEngine/launch.html','012','resizable=yes,width=1000,height=630')">Business Phone Systems &#8212; Comparison</a></p></td>
<td align="right"><p>M012</p></td>
</tr>
<tr>
<td><p>&nbsp;</p></td>
<td><p>&nbsp;</p></td>
<td align="right"><p>&nbsp;</p></td>
</tr>
<tr>
<td><p>Module 01</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M05/courseEngine/launch.html','005','resizable=yes,width=1000,height=630')">Introduction to SIMON</a></p></td>
<td align="right"><p>M05</p></td>
</tr>
<tr>
<td><p>Module 01</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M069/courseEngine/launch.html','069','resizable=yes,width=1000,height=630')">Creditworthiness</a></p></td>
<td align="right"><p>M069</p></td>
</tr>
<tr>
<td><p>Module 02</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M029/courseEngine/launch.html','029','resizable=yes,width=1000,height=630')">InSight</a></p></td>
<td align="right"><p>M029</p></td>
</tr>
<tr>
<td><p>Module 03</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M06/courseEngine/launch.html','006','resizable=yes,width=1000,height=630')">BOSS, Trust and CRB+</a></p></td>
<td align="right"><p>M06</p></td>
</tr>
<tr>
<td><p>Module 04</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M064/courseEngine/launch.html','064','resizable=yes,width=1000,height=630')">Advanced Network Access</a></p></td>
<td align="right"><p>M064</p></td>
</tr>
<tr>
<td><p>Module 04</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M049/courseEngine/launch.html','049','resizable=yes,width=1000,height=630')">Flow of a Service Order</a></p></td>
<td align="right"><p>M049</p></td>
</tr>
<tr>
<td><p>Module 04</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M031/courseEngine/launch.html','031','resizable=yes,width=1000,height=630')">TRUST: Service Order Screen</a></p></td>
<td align="right"><p>M031</p></td>
</tr>
<tr>
<td><p>Module 05</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M07/courseEngine/launch.html','007','resizable=yes,width=1000,height=630')">Service Orders Practice (N)</a></p></td>
<td align="right"><p>M07</p></td>
</tr>
<tr>
<td><p>Module 09</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M067/courseEngine/launch.html','067','resizable=yes,width=1000,height=630')">Toll-Free Service</a></p></td>
<td align="right"><p>M067</p></td>
</tr>
<tr>
<td><p>Module 10</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M068/courseEngine/launch.html','068','resizable=yes,width=1000,height=630')">Service Order Simulations</a></p></td>
<td align="right"><p>M068</p></td>
</tr>
<tr>
<td><p>Module 11</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M08/courseEngine/launch.html','008','resizable=yes,width=1000,height=630')">Introduction to MARTENS</a></p></td>
<td align="right"><p>M08</p></td>
</tr>
<tr>
<td><p>Module 12</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M063/courseEngine/launch.html','063','resizable=yes,width=1000,height=630')">Internet Services &amp;</a><a href="javascript:;" onclick="MM_openBrWindow('M024/courseEngine/launch.html','024','resizable=yes,width=1000,height=630')">maxTV</a></p></td>
<td align="right"><p>M063</p></td>
</tr>
<tr>
<td><p>Module 13</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M018/courseEngine/launch.html','018','resizable=yes,width=1000,height=630')">Telephone Systems &#8212; Centrex</a></p></td>
<td align="right"><p>M018</p></td>
</tr>
<tr>
<td><p>Module 13</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M047/courseEngine/launch.html','047','resizable=yes,width=1000,height=630')">Telephone Systems &#8212; Key Systems &amp; PBX</a></p></td>
<td align="right"><p>M047</p></td>
</tr>
<tr>
<td><p>Module 14</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M038/courseEngine/launch.html','038','resizable=yes,width=1000,height=630')">Phone Systems &#8212; Comparisons</a></p></td>
<td align="right"><p>M038</p></td>
</tr>
<tr>
<td><p>Module 15</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M050/courseEngine/launch.html','050','resizable=yes,width=1000,height=630')">Advanced Service Order Practice</a></p></td>
<td align="right"><p>M050</p></td>
</tr>
<tr>
<td><p>Module 16</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M070/courseEngine/launch.html','070','resizable=yes,width=1000,height=630')">Key System &amp; Centrex Customer Scenarios</a></p></td>
<td align="right"><p>M070</p></td>
</tr>
<tr>
<td><p>Module 17</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M048/courseEngine/launch.html','048','resizable=yes,width=1000,height=630')">Internet &amp; </a><a href="javascript:;" onclick="MM_openBrWindow('M024/courseEngine/launch.html','024','resizable=yes,width=1000,height=630')">maxTV</a><a href="javascript:;" onclick="MM_openBrWindow('M048/courseEngine/launch.html','048','resizable=yes,width=1000,height=630')"> Service Orders</a></p></td>
<td align="right"><p>M048</p></td>
</tr>
<tr>
<td><p>Module 18</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M041/courseEngine/launch.html','041','resizable=yes,width=1000,height=630')">The Sales Request</a></p></td>
<td align="right"><p>M041</p></td>
</tr>
<tr>
<td><p>Module 19</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M034/courseEngine/launch.html','034','resizable=yes,width=1000,height=630')">Introduction to ANWorkflow</a></p></td>
<td align="right"><p>M034</p></td>
</tr>
<tr>
<td><p>Module 19</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M035/courseEngine/launch.html','035','resizable=yes,width=1000,height=630')">Creating and Submitting an NFR</a></p></td>
<td align="right"><p>M035</p></td>
</tr>
<tr>
<td><p>Module 19</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M036/courseEngine/launch.html','036','resizable=yes,width=1000,height=630')">Cancelling and Updating an NFR</a></p></td>
<td align="right"><p>M036</p></td>
</tr>
<tr>
<td><p>Module 20</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M043/courseEngine/launch.html','043','resizable=yes,width=1000,height=630')">The First Service Agreement</a></p></td>
<td align="right"><p>M043</p></td>
</tr>
<tr>
<td><p>Module 21</p></td>
<td><p><a href="javascript:;" onclick="MM_openBrWindow('M057/courseEngine/launch.html','057','resizable=yes,width=1000,height=630')">Billing Inquiry</a></p></td>
<td align="right"><p>M057</p></td>
</tr>
</table>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top