Patrick.O.Ige

Knowledge Creation is Essential to Business, and Communication is Essential to Knowledge Creation

  Home  |   Contact  |   Syndication    |   Login
  97 Posts | 5 Stories | 350 Comments | 0 Trackbacks

News

SharePoint SharePoint SharePoint

Article Categories

Archives

Post Categories

ADO.NET

Ajax

API/WebServices

ASP.NET Resources

BizTalk Server

Blogs I read

Free Books

How to

JQuery

LINQ

Misc

Mobile BI

Reporting Services

SEO

Sharepoint Resources/Tools

SharePoint 2010 Branding

SharePoint 2010 Videos

SilverLight

SQL Server

Sql Server 2012

SSIS

Web Performace Tools

Windows Phone

WorkFlows

WSS V3

xml

I was working on a a DWP using Sharepoint Designer and i wanted to get the value of a node using Jquery
So i added a <div id="myid"></div>

and then on the client did some $(div#miyd)
But what i noticed is that anytime i save my page in Sharepoint Designer and open it up again my div id changes to

<div id="myid{generate-id()}"></div>
So i came across some solution from Marcs Blog here which suggested you add a variable like so
<xsl:variable name="myid/>
and then use it later like this
<div id="myid"></div> but this didn't work.
So the solution was to add the magic expression like this <div id="{myid}"></div>
And that worked like a charm
 

posted on Friday, August 20, 2010 2:36 AM