Solved

SharePoint 2007 - Show Created Date on top when selected

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…

856 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