EDN Admin
Well-known member
I Try to run below html file with javascript function it working <span style="text-decoration:underline
in Mozilla But not working in IE and Crome So any body can help me how to run in<span style="text-decoration:underline IE and Crome
<span style="text-decoration:underline home.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd <br/>
<html xmlns="http://www.w3.org/1999/xhtml <br/>
<head><br/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><br/>
<title>Home</title><br/>
<script type="text/javascript" src="sarissa.js </script><br/>
<br/>
</head><br/>
<br/>
<body bgcolor="#CCCCCC" onload="XsltTransform(); <br/>
<table widtd="100%" border="1" cellspacing="0" cellpadding="0" align="center <br/>
<tr><br/>
<td align="left" valign="top" scope="row <br/>
<table widtd="100%" border="1" cellspacing="0" cellpadding="0 <br/>
<tr><br/>
<td colspan="2" scope="row <br/>
<img src="../ecommerce data/ecom image/banner-ecommerce.jpg" /><br/>
</td><br/>
</tr><br/>
<tr><td> </td></tr><br/>
<tr><br/>
<td widtd="19%" align="left" valign="top" scope="row <br/>
<table width="100%" border="1" cellspacing="0" cellpadding="0 <br/>
<tr><br/>
<td ><br/>
<br/>
<script type="text/javascript <br/>
function loadXMLDoc(dname) {<br/>
xhttp = new XMLHttpRequest();<br/>
xhttp.open("GET",dname,false);<br/>
xhttp.send("");<br/>
return xhttp.responseXML;<br/>
}<br/>
var processor = new XSLTProcessor();<br/>
var theXML = loadXMLDoc(books.xml);<br/>
var theXSL = loadXMLDoc(verticalmenu.xsl);<br/>
// prepare the processor<br/>
processor.importStylesheet(theXSL);<br/>
var theResult = processor.transformToDocument(theXML);<br/>
// now you have a DomDocument with the result<br/>
// if you want to serialize (transform to a string) it you van use<br/>
document.write(new XMLSerializer().serializeToString(theResult));<br/>
</script><br/>
</body><br/>
</html><br/>
</script><br/>
<br/>
</td><br/>
</tr><br/>
</table><br/>
</td><br/>
<td width="81%" ></td><br/>
</tr><br/>
<tr><br/>
<td colspan="2 </td><br/>
</tr><br/>
</table></td><br/>
</tr><br/>
</table><br/>
</body><br/>
</html>
<span style="text-decoration:underline books.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><br/>
<!--?xml-stylesheet type="text/xsl verticalmenu.xsl"?--><br/>
<br/>
<Books><br/>
<book><br/>
<AA><br/>
<title>JAVA</title><br/>
<location>GOOGLE</location><br/>
<publisher><br/>
<BB><br/>
<title>YAHOO</title><br/>
<SUB>MAIL</SUB><br/>
<SUB1>EDUCATION</SUB1><br/>
<SUB2>GAMES</SUB2><br/>
<SUB3>MOBILE</SUB3><br/>
</BB><br/>
</publisher><br/>
<year>GMAIL</year><br/>
</AA><br/>
</book><br/>
<book><br/>
<CC><br/>
<title>MY BOOK</title><br/>
<location>BALAGURU</location><br/>
<publisher>TC</publisher><br/>
<year>2011</year><br/>
</CC><br/>
</book><br/>
<book><br/>
<ABCD><br/>
<title>ABCD</title><br/>
<location>DIV</location><br/>
<publisher>TC</publisher><br/>
<year>2011</year><br/>
</ABCD><br/>
</book><br/>
<book><br/>
<XYZ><br/>
<title>XYZ</title><br/>
<location>XYZ</location><br/>
<publisher>XYZ</publisher><br/>
<year>XYZ</year><br/>
</XYZ><br/>
</book><br/>
</Books>
<span style="text-decoration:underline verticalmenu.xsl
<?xml version="1.0"?><br/>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform <br/>
<xslutput method="html" encoding="iso-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/><br/>
<xsl:template match="/ <br/>
<html><br/>
<head><br/>
<title>Dynamic Menu</title><br/>
<link rel="stylesheet" type="text/css verticalmenu.css" title="Style"/><br/>
</head><br/>
<body><br/>
<div id="navigation <br/>
<br/>
<br/>
<xsl:for-each select="Books/book/AA <br/>
# <xsl:value-of select="title"/> <br/>
<br/>
# <xsl:value-of select="location" /> <br/>
<br/>
<xsl:for-each select="publisher/BB <br/>
http://www.yahoo.com <xsl:value-of select="title"
/> <br/>
<br/>
# <xsl:value-of
select="SUB" /> <br/>
# <xsl:value-of
select="SUB1" /> <br/>
# <xsl:value-of
select="SUB2" /> <br/>
# <xsl:value-of
select="SUB3" /> <br/>
<br/>
</xsl:for-each>
<br/>
<br/>
# <xsl:value-of select="year" /> <br/>
<br/>
<br/>
</xsl:for-each><br/>
<br/>
<br/>
About us<br/>
<br/>
Contact us<br/>
<br/>
<br/>
<xsl:for-each select="Books/book/CC <br/>
# <xsl:value-of select="title"/> <br/>
<br/>
# <xsl:value-of select="location" /> <br/>
<br/>
# <xsl:value-of select="publisher"
/> <br/>
<br/>
Sub Sub Menu Item 1<br/>
Sub Sub Menu Item 2<br/>
Sub Sub Menu Item 3<br/>
Sub Sub Menu Item 4<br/>
<br/>
<br/>
<br/>
</xsl:for-each>
<br/>
<br/>
<br/>
<xsl:for-each select="Books/book/ABCD <br/>
# <xsl:value-of select="title"/> <br/>
<br/>
# <xsl:value-of select="location" /> <br/>
<br/>
Sub Sub Menu Item 1<br/>
Sub Sub Menu Item 2<br/>
Sub Sub Menu Item 3<br/>
Sub Sub Menu Item 4<br/>
<br/>
<br/>
# <xsl:value-of select="publisher" /> <br/>
# <xsl:value-of select="year" /> <br/>
<br/>
</xsl:for-each>
<br/>
<br/>
<br/>
<br/>
</body><br/>
</html><br/>
<br/>
</xsl:template><br/>
</xsl:stylesheet>
Thanx for advance.
View the full article
in Mozilla But not working in IE and Crome So any body can help me how to run in<span style="text-decoration:underline IE and Crome
<span style="text-decoration:underline home.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd <br/>
<html xmlns="http://www.w3.org/1999/xhtml <br/>
<head><br/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><br/>
<title>Home</title><br/>
<script type="text/javascript" src="sarissa.js </script><br/>
<br/>
</head><br/>
<br/>
<body bgcolor="#CCCCCC" onload="XsltTransform(); <br/>
<table widtd="100%" border="1" cellspacing="0" cellpadding="0" align="center <br/>
<tr><br/>
<td align="left" valign="top" scope="row <br/>
<table widtd="100%" border="1" cellspacing="0" cellpadding="0 <br/>
<tr><br/>
<td colspan="2" scope="row <br/>
<img src="../ecommerce data/ecom image/banner-ecommerce.jpg" /><br/>
</td><br/>
</tr><br/>
<tr><td> </td></tr><br/>
<tr><br/>
<td widtd="19%" align="left" valign="top" scope="row <br/>
<table width="100%" border="1" cellspacing="0" cellpadding="0 <br/>
<tr><br/>
<td ><br/>
<br/>
<script type="text/javascript <br/>
function loadXMLDoc(dname) {<br/>
xhttp = new XMLHttpRequest();<br/>
xhttp.open("GET",dname,false);<br/>
xhttp.send("");<br/>
return xhttp.responseXML;<br/>
}<br/>
var processor = new XSLTProcessor();<br/>
var theXML = loadXMLDoc(books.xml);<br/>
var theXSL = loadXMLDoc(verticalmenu.xsl);<br/>
// prepare the processor<br/>
processor.importStylesheet(theXSL);<br/>
var theResult = processor.transformToDocument(theXML);<br/>
// now you have a DomDocument with the result<br/>
// if you want to serialize (transform to a string) it you van use<br/>
document.write(new XMLSerializer().serializeToString(theResult));<br/>
</script><br/>
</body><br/>
</html><br/>
</script><br/>
<br/>
</td><br/>
</tr><br/>
</table><br/>
</td><br/>
<td width="81%" ></td><br/>
</tr><br/>
<tr><br/>
<td colspan="2 </td><br/>
</tr><br/>
</table></td><br/>
</tr><br/>
</table><br/>
</body><br/>
</html>
<span style="text-decoration:underline books.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><br/>
<!--?xml-stylesheet type="text/xsl verticalmenu.xsl"?--><br/>
<br/>
<Books><br/>
<book><br/>
<AA><br/>
<title>JAVA</title><br/>
<location>GOOGLE</location><br/>
<publisher><br/>
<BB><br/>
<title>YAHOO</title><br/>
<SUB>MAIL</SUB><br/>
<SUB1>EDUCATION</SUB1><br/>
<SUB2>GAMES</SUB2><br/>
<SUB3>MOBILE</SUB3><br/>
</BB><br/>
</publisher><br/>
<year>GMAIL</year><br/>
</AA><br/>
</book><br/>
<book><br/>
<CC><br/>
<title>MY BOOK</title><br/>
<location>BALAGURU</location><br/>
<publisher>TC</publisher><br/>
<year>2011</year><br/>
</CC><br/>
</book><br/>
<book><br/>
<ABCD><br/>
<title>ABCD</title><br/>
<location>DIV</location><br/>
<publisher>TC</publisher><br/>
<year>2011</year><br/>
</ABCD><br/>
</book><br/>
<book><br/>
<XYZ><br/>
<title>XYZ</title><br/>
<location>XYZ</location><br/>
<publisher>XYZ</publisher><br/>
<year>XYZ</year><br/>
</XYZ><br/>
</book><br/>
</Books>
<span style="text-decoration:underline verticalmenu.xsl
<?xml version="1.0"?><br/>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform <br/>
<xslutput method="html" encoding="iso-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/><br/>
<xsl:template match="/ <br/>
<html><br/>
<head><br/>
<title>Dynamic Menu</title><br/>
<link rel="stylesheet" type="text/css verticalmenu.css" title="Style"/><br/>
</head><br/>
<body><br/>
<div id="navigation <br/>
<br/>
<br/>
<xsl:for-each select="Books/book/AA <br/>
# <xsl:value-of select="title"/> <br/>
<br/>
# <xsl:value-of select="location" /> <br/>
<br/>
<xsl:for-each select="publisher/BB <br/>
http://www.yahoo.com <xsl:value-of select="title"
/> <br/>
<br/>
# <xsl:value-of
select="SUB" /> <br/>
# <xsl:value-of
select="SUB1" /> <br/>
# <xsl:value-of
select="SUB2" /> <br/>
# <xsl:value-of
select="SUB3" /> <br/>
<br/>
</xsl:for-each>
<br/>
<br/>
# <xsl:value-of select="year" /> <br/>
<br/>
<br/>
</xsl:for-each><br/>
<br/>
<br/>
About us<br/>
<br/>
Contact us<br/>
<br/>
<br/>
<xsl:for-each select="Books/book/CC <br/>
# <xsl:value-of select="title"/> <br/>
<br/>
# <xsl:value-of select="location" /> <br/>
<br/>
# <xsl:value-of select="publisher"
/> <br/>
<br/>
Sub Sub Menu Item 1<br/>
Sub Sub Menu Item 2<br/>
Sub Sub Menu Item 3<br/>
Sub Sub Menu Item 4<br/>
<br/>
<br/>
<br/>
</xsl:for-each>
<br/>
<br/>
<br/>
<xsl:for-each select="Books/book/ABCD <br/>
# <xsl:value-of select="title"/> <br/>
<br/>
# <xsl:value-of select="location" /> <br/>
<br/>
Sub Sub Menu Item 1<br/>
Sub Sub Menu Item 2<br/>
Sub Sub Menu Item 3<br/>
Sub Sub Menu Item 4<br/>
<br/>
<br/>
# <xsl:value-of select="publisher" /> <br/>
# <xsl:value-of select="year" /> <br/>
<br/>
</xsl:for-each>
<br/>
<br/>
<br/>
<br/>
</body><br/>
</html><br/>
<br/>
</xsl:template><br/>
</xsl:stylesheet>
Thanx for advance.
View the full article