Tuesday, July 14, 2009

How to call a Javascript function to use XSLNode value in SharePoint Designer

Hi,
To use any node(item) value in custom SharePoint page for SharePoint list using javascript you can use like this.

GetPic(var status)
{Put your code here}

Call JavaScript Function
{script type="text/javascript"}
document.write(GetPic("{xsl:value-of select="@Status" /}" ) )
{/script}

Replace curly brackets with respective angular brackets.
You must write &quot at the place of quote otherwise there will be xslt error.

Hope that will help you.

No comments: