Solved

SharePoint 2007 - Show Created Date on top when selected

Posted on 2013-06-04
2
279 Views
Last Modified: 2013-06-10
When I select the filter of 'Created' say 1/1/2013

How do I make 1/1/2013 (selected date) to appear in a content editor above in the dispform.aspx view item

Thanks.
0
Comment
Question by:sharepoint2013
2 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 39223846
Hi,
this code works:
<script type="text/javascript" src="/_layouts/jslib/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
var defaultOutput = '';
var requestUri = window.location.search.substring(1);
var rawUrl = decodeURIComponent(requestUri);
var urlParams = new Array();
var urlParam = rawUrl.split("&");
for (var i=0; i<urlParam.length; i++) {
var currParam = urlParam[i].split("=");
var key = currParam[0];
var val = currParam[1];
urlParams[key] = val;
}
//FilterField1=Created&FilterValue1=06%2F05%2F2013
if (urlParams['FilterField1'] &&  urlParams['FilterValue1'])
{
	if (urlParams['FilterField1'] == 'Created')
	{
		defaultOutput = decodeURIComponent(urlParams['FilterValue1']);
	}
}
$("#outputdiv").text(defaultOutput);
});
</script>
<div id="outputdiv">Replace me</div>

Open in new window


HTH
Rainer
0
 

Author Closing Comment

by:sharepoint2013
ID: 39235871
Thanks!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Tools for analysis of code 4 48
JS library vs Js framework 11 23
Jquery 7 33
Link Anchor Not working 9 49
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question