Solved

SharePoint 2007 - Show Created Date on top when selected

Posted on 2013-06-04
2
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: 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

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 …
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
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…

690 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