Skip to main content
15 events
when toggle format what by license comment
Apr 14, 2015 at 14:11 comment added wjervis @user21081 try $('input[id*=drpInitiativeType]')
Apr 14, 2015 at 9:29 comment added domsen123 maybe you can add a title attribute in visual studio to asp dropdown? or an CssClass... something you can select by jQuery...
Apr 14, 2015 at 7:47 comment added Brishal i am using code... <script src="/sites/BM/Documents/jquery-1.10.2.min.js"></script> <script type='text/javascript'> $(document).ready(function(){ if($('#drStatus').find("option:selected").val() == "<Initiative Type>") { $('#drStatus').val("FRP"); } }); </script>
Apr 14, 2015 at 7:45 comment added Brishal i have checked using F12 and ID showing is ctl00$m$g_b3b4524e_b014_41c4_a818_77a3eaedc972$drpInitiativeType
Apr 13, 2015 at 18:28 comment added wjervis @domsen123 The dropdown is in a web part, created via Visual Studio. I have a feeling the dropdown is a .Net DropDownList, and OP is getting the id wrong, since the id changes when the HTML is generated.
Apr 13, 2015 at 16:57 comment added domsen123 this working on all sharepoint versions... I'm working on SP2013 onprem... but maybe you are not implementing jquery? see here: jquery.com
Apr 13, 2015 at 16:12 comment added wjervis @user21081 What code did you use that did not work? And what version of SP are you on?
Apr 13, 2015 at 14:51 comment added domsen123 Hi user21081... look at your sourcecode with developer tools (F12)... you can see the title attribute there...
Apr 13, 2015 at 12:38 comment added Brishal This is not working.. just one question field display name is "Status" and ID is drstatus which I have to use in Title. Thanks
Apr 13, 2015 at 12:04 comment added wjervis And just a note, if this is SP2013/SPO, if the field is a required field, then the title would be _title of column_ Required Field.
Apr 13, 2015 at 12:00 review Low quality posts
Apr 13, 2015 at 12:02
Apr 13, 2015 at 11:59 comment added wjervis Fixed your quotes
Apr 13, 2015 at 11:59 history edited wjervis CC BY-SA 3.0
Added missing quote
Apr 13, 2015 at 11:40 review Low quality posts
Apr 13, 2015 at 11:43
Apr 13, 2015 at 11:23 history answered domsen123 CC BY-SA 3.0