.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Set Default value for Status column on your NewForm.aspx using Jquery

Posted By:Sagar Pardeshi       Posted Date: January 12, 2014    Points: 25    Category: SharePoint    URL: http://www.dotnetspark.com  

Set Default value for Status column on your NewForm.aspx using Jquery
 

Introduction

We Provide a quick tip on how you can set your Status column (dropdown) defaulted to Open/Close value  using Jquery. when Approver section Approval select Approve value then automatic set status column Open Value and Approval select Reject value then automatic set status column Close Value .

Code Steps:

    <script language="javascript" src="/JS/jquery-1.9.0.min.js" type="text/javascript"></script><script language="javascript" type="text/javascript">
$(document).ready(function(){
 var selected="";
$(".ms-RadioText input[type='radio']").click(function(){
	selected = $("input[type='radio']:checked");
		if($(this).val() == "ctl00")
		{
		$("select[Title='Tools Status']").val('Open').attr("selected", "selected");
		}
               else
                {
                $("select[Title='Tools Status']").val('Close').attr("selected", "selected");
                }
	});
 });
</script>
Before Selecting Approver Option:



Summary

In this Article We explore   Provide a quick tip on how you can set your column value using jquey.


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend