Posts

Showing posts with the label javascript

Sharepoint List: Days Elapsed or Countdown

Image
SharePoint List: How to Display Days Elapsed or Countdown  Problem :Have you thought about introducing a countdown or even days elapsed as a feature in a sharepoint list? Solution: Well i have a solution for you using javascript. It does get a little involved with code but very easy to implement. 4 Step Implementation: Step 1 : Create the list in sharepoint and name it what you like Add two columns: Column 'Today" type = Date and Time Column 'Days Elapsed' type = calculated Step 2 : Under list settings, go to column you have just added called Days Elapsed and enter the following formula: =ROUND(Today-Created,0)&" days" --> Output Data Type as a Single Line of Text. Step 3 : Some code --> Copy the code below and paste it into a nodepad, go through the code and change the name of your list: Look for LIST NAME , thats where you will change the name to your list name and also change the column name for "Today" if you named it...

Drop down with redirect function

<!DOCTYPE html> <html> <body> <h3 align="center">Where Do You Want to Go Today?</h3> <center> <form>   <p><select name="section" size="1" language="javascript" onChange="gotoPage(this.selectedIndex);">   <option selected>Where do you want to go today?</option>   <option>Google</option>   <option>Microsoft Home Page</option>   <option>MSN Home Page</option>   </select></p> </form> </center> <script language="JavaScript"> <!-- function gotoPage(varItem) {   switch(varItem)   {     case 0:       window.parent.self.status="Goes Nowhere";       break;     case 1:      window.location="http://www.google.com";       break;     case 2:       window.location="http://www.microsoft.com";   ...