Join
Sign in
Search Options
Search Everything
Search Development Tools
Home
Blog
Resources
Forums
About Open XML
More ...
Home
»
Forums
»
Development Tools
»
Scripting Languages
»
get the browser version using XSLT and java script
Re: get the browser version using XSLT and java script
Development Tools
Discussions about working with Open XML using a wide range of development tools
Get this RSS feed
Details
1
Reply
1
Subscriber
Posted
over 4 years ago
Options
Subscribe via RSS
Share this
Scripting Languages
get the browser version using XSLT and java script
rated by 0 users
This post has
1 Reply |
1
Follower
suralk
150
Posted by
suralk
on
Sat, Nov 8 2008 12:04 PM
rated by 0 users
Post Points: 20
get the browser version using XSLT and java script
Hi,
I want to embed some javascript code into the XSLT transformation, which detects the user's browser.
The code i wrote is shown below:
<msxsl:script language="JavaScript" implements-prefix="user">
<![CDATA[
function getBrowser() {
return navigator.appName;
}
]]>
</msxsl:script>
But when the style sheet is used in the transformation, it says that the variable 'navigator' is not declared. but 'navigator' is a key javascript object.
Can somebody explain why this is so?
Best Regards,
suralk
Intergen
2610
Posted by
Intergen
on
Thu, Apr 15 2010 11:35 PM
rated by 0 users
Post Points: 5
Re: get the browser version using XSLT and java script
Hi there
Try output a message, alert("something") to debug first.
Page 1 of 1 (2 items)