Adjust static value into dynamic (javascript) value possible in Sharepoint allitems.aspx page?

Posted by lerac on Stack Overflow See other posts from Stack Overflow or by lerac
Published on 2010-04-08T21:16:37Z Indexed on 2010/04/08 21:33 UTC
Read the original article Hit count: 279

Filed under:
|
|
<SharePoint:SPDataSource runat="server" IncludeHidden="true" SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;OrderBy&gt;&lt;FieldRef Name=&quot;EventDate&quot;/&gt;&lt;/OrderBy&gt;&lt;Where&gt;&lt;Contains&gt;&lt;FieldRef Name=&quot;lawyer_x0020_1&quot;/&gt;&lt;Value Type=&quot;Note&quot;&gt;F. Sanches&lt;/Value&gt;&lt;/Contains&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;" id="datasource1" DataSourceMode="List" UseInternalName="true"><InsertParameters><asp:Parameter DefaultValue="{ANUMBER}" Name="ListID"></asp:Parameter>

This codeline is just one line of the allitems.aspx of a sharepoint list item. It only displays items where lawyer 1 = F. Sanches. Before I start messing around with the .ASPX page I wonder if it possible to change F. Sanches (in the code) into a dynamical variable (from a javascript value or something else that can be used to place the javascript value in there dynamically). If I put any javascript code in the line it will not work.

P.S. Ignore ANUMBER part in code.

Let say to make it simple I have javascript variable like this (now static but with my other code it is dynamic). It would be an achievement if it would place a static javascript variable.

<SCRIPT type=text/javascript>javaVAR = "P. Janssen";</script>

If Yes --> how?

If No --> Thank you!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about sharepoint