wordpress hit counter
Welcome to OpenXML Developer Sign in | Join | Help

get the browser version using XSLT and java script

Last post 11-08-2008, 12:04 PM by suralk. 0 replies.
Sort Posts: Previous Next
  •  11-08-2008, 12:04 PM 3851

    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
View as RSS news feed in XML