I have a dropdown box name Status
added in sharepoint page which have option (choose
.. , In progress
, Closed
). Where Choose..
is bydefault value. When I open the page the value Choose..
should get change automatically to In progress
.
Like if dropdown status == Choose value should get change to In progress while page load. Can someone provide me javascript to perform this action.
What I have tried:
<script src="/jquery-1.10.2.min.js"></script>
<script type='text/javascript'>
$(document).ready(function(){
if($('#drStatus').find("option:selected").val() == "Choose..") {
$('#drStatus').val("In Progress");
}
});
</script>