C
Charles Chow
Any clue on why I got this error when I use javascript function in
XSLT? The same javescript works fine with ASP. What this function
does is to keep only one window (with media player activeX control)
instance.
Your assistance is much appreciated.
Charles
Error message:
----------------
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
A name was started with an invalid character. Error processing
resource 'file:///C:/temp/case_export/tt-200312031606/MyCase.xslt'.
Line 39, Position 44
if ( playerwindow && !playerwindow.closed ) {
-------------------------------------------^
XSLT files:
-------------
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user='urn:user'
version="1.0">
<xslutput method="html"/>
<xsl:template match="RMSCase">
<HTML>
<HEAD>
<TITLE>My case</TITLE>
<STYLE>
.data {font-family:tahoma, sans-serif; font-size=10pt}
.title {font-family:tahoma, sans-serif; background-color:eeeeee;
font-size:8pt; padding:5,5,5,5}
.text {font-family:courier new; font-size:10pt}
.header {font-family:verdana; font-size=14pt}
.header2 {font-family:verdana; font-size=12pt;}
.header3 {font-family:verdana; font-size=10pt;}
</STYLE>
<SCRIPT language="javascript">
var playerwindow=null;
function LaunchPlayer(name,iname,number,date,duration)
{
var location;
var qlocation;
var winname;
location = document.URL;
location = location.substring(7,location.length);
var pos = location.lastIndexOf("\\");
location = location.substring(0,pos);
location = location.replace(/\\/g,"\\");
location = location + "\\";
qlocation = unescape(location);
winname = 'Player.html?Param=' + qlocation + ',' + name;
winname = winname + ',' + number + ',' + date + ',' + iname +
',' + duration;
if ( playerwindow && !playerwindow.closed ) {
if ( confirm("Are you sure you want to play another
recording?") ) {
playerwindow.document.MediaPlayer.stop();
playerwindow.close();
playerwindow =
window.open(winname,"Player","height=200,width=440,status=no,toolbar=no,menubar=no,location=no;
titlebar=no");
playerwindow.focus();
}
}
else {
playerwindow = window.open(winname,"Player","height=200,width=440,status=no,toolbar=no,menubar=no,location=no;
titlebar=no");
playerwindow.focus();
}
return;
}
</SCRIPT>
</HEAD>
......
XSLT? The same javescript works fine with ASP. What this function
does is to keep only one window (with media player activeX control)
instance.
Your assistance is much appreciated.
Charles
Error message:
----------------
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
A name was started with an invalid character. Error processing
resource 'file:///C:/temp/case_export/tt-200312031606/MyCase.xslt'.
Line 39, Position 44
if ( playerwindow && !playerwindow.closed ) {
-------------------------------------------^
XSLT files:
-------------
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user='urn:user'
version="1.0">
<xslutput method="html"/>
<xsl:template match="RMSCase">
<HTML>
<HEAD>
<TITLE>My case</TITLE>
<STYLE>
.data {font-family:tahoma, sans-serif; font-size=10pt}
.title {font-family:tahoma, sans-serif; background-color:eeeeee;
font-size:8pt; padding:5,5,5,5}
.text {font-family:courier new; font-size:10pt}
.header {font-family:verdana; font-size=14pt}
.header2 {font-family:verdana; font-size=12pt;}
.header3 {font-family:verdana; font-size=10pt;}
</STYLE>
<SCRIPT language="javascript">
var playerwindow=null;
function LaunchPlayer(name,iname,number,date,duration)
{
var location;
var qlocation;
var winname;
location = document.URL;
location = location.substring(7,location.length);
var pos = location.lastIndexOf("\\");
location = location.substring(0,pos);
location = location.replace(/\\/g,"\\");
location = location + "\\";
qlocation = unescape(location);
winname = 'Player.html?Param=' + qlocation + ',' + name;
winname = winname + ',' + number + ',' + date + ',' + iname +
',' + duration;
if ( playerwindow && !playerwindow.closed ) {
if ( confirm("Are you sure you want to play another
recording?") ) {
playerwindow.document.MediaPlayer.stop();
playerwindow.close();
playerwindow =
window.open(winname,"Player","height=200,width=440,status=no,toolbar=no,menubar=no,location=no;
titlebar=no");
playerwindow.focus();
}
}
else {
playerwindow = window.open(winname,"Player","height=200,width=440,status=no,toolbar=no,menubar=no,location=no;
titlebar=no");
playerwindow.focus();
}
return;
}
</SCRIPT>
</HEAD>
......