Solved

SharePoint 2007 - Show Created Date on top when selected

Posted on 2013-06-04
2
272 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now