473,383 Members | 1,837 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Works in IE not in Mozilla

Hi
Iam trying to make my application work in Mozilla.
The below piece of code works well in IE but throws error in Mozilla.
Can you modify the below piece of code so that it supports IE and mozilla.
Kindly let me know some links which will help beginners to learn about coding in Mozilla Brower.

[html]<HTML>
<HEAD>
<SCRIPT language=javascript SRC='../common/js/common.js'></SCRIPT><SCRIPT>
var xslProc = null;
var xslFileName = "Url to .xsl file";
var ALTCALENDAR_TYPE = 'false';
var calType = 'A';
var dateFormat = 'dd/MM/yyyy';
var xslCachObj = "null";
if(top.frames['loginFrame'] == null) {
try {
xslProc = eval("top.window.opener.window.top.frames['loginFrame'].frames['" + FRAMENAME + "'].document.frames['CacheMgr'].getXSLProcObject(xslFileName,xslCachObj)");
}
catch(e){ }
} else {
try {
xslProc = eval("top.frames['loginFrame'].frames['" + FRAMENAME + "'].document.frames['CacheMgr'].getXSLProcObject(xslFileName,xslCachObj)");
}
catch(e){ }
}
if(xslProc == null) {
var xsl = new ActiveXObject("MSXML2.FreeThreadedDOMDocument.3.0" );
var sTime = new Date();
xsl.async = false;
xsl.setProperty("ForcedResync",false);
var xslTemplate = new ActiveXObject("MSXML2.XSLTemplate.3.0");
xsl.load(xslFileName);
xslTemplate.stylesheet = xsl;
xslProc = xslTemplate.createProcessor();
}
function SRMTransformIsland(XMLIsLandName, pageIndex, NumPages){
var xml = new ActiveXObject("MSXML2.FreeThreadedDOMDocument.3.0" );
var xml2 = XMLIsLandName.XMLDocument;
xml.loadXML(xml2.xml);
xml.async = false;
xml.setProperty("ForcedResync",false);

xslProc.reset() ;
xslProc.input = xml;
xslProc.addParameter("currency", "USD");
xslProc.addParameter("altLocaleType", "AMERICAN");
xslProc.addParameter("baseLocaleType", "AMERICAN");
xslProc.addParameter("NumPages", "1");
xslProc.addParameter("ALTCALENDAR_TYPE", "false");
xslProc.addParameter("calType", "A");
xslProc.addParameter("dateFormat", "dd/MM/yyyy");
xslProc.addParameter("altLocaleActv", "false");
if (xslProc.transform)
{
var s = xslProc.output;
document.write(s);
}
}
</SCRIPT>
</HEAD>

<XML ID="xmlIsland_0">
<SCRIPT>
TransformIsland( xmlIsland_0, 0, 1 );
</SCRIPT>

</HTML>[/html]
Dec 13 '07 #1
1 1794
Dasty
101 Expert 100+
Because ActiveX objects are strictly IE only.

You have to find other ways (other then activex) to solve same problem on other browsers. For example here is XSLT for Mozilla browsers:

http://developer.mozilla.org/en/docs/Using_the_Mozilla_JavaScript_interface_to_XSL_Tran sformations

Sorry, can not help more ...
Dec 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Dennis Hueckelheim | last post by:
Hallo everybody, I have a problem with a little socket script. ----- snipp ----- $out_clients = socket_accept($socket_out); $http_welcome = "HTTP/1.0 200 OK\r\nContent-type:...
1
by: thumb_42 | last post by:
Hello PHP people. I'm baffled by a problem I've been having since I've upgraded my system. PHP apps that used to work no longer work with mozilla, but they DO work with other browsers. It...
10
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
6
by: RossRGK | last post by:
A script I've implemented is doing this annoying thing where it works in mozilla only if you have Firebug installed. I was all excited to find someone had solved what sounded like the same...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.