Suppose we have a list and a doc library. Both have a common column by which they are connected. So in the list, to make the radio checked by default, we need to do the following steps.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript">
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript">
function initjLoadMe() {
var arrayList = $("img[src*='rbsel.gif']").parent();
if(arrayList.length == 0)
//Pass the view ID and SelectedID
SelectField('{ED49DA87-0864-41A5-A153-8DB45BC43309}','1');
return false;
}
$(document).ready(function() {
initjLoadMe();
});
</script>
Happy coding.
- Click on the radio of the item that you want to make it auto checked when the page loads.
- When you click the radio, the page reloads. Get the view GUID and SelectedID query string values and pass them in the code below.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript">
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript">
function initjLoadMe() {
var arrayList = $("img[src*='rbsel.gif']").parent();
if(arrayList.length == 0)
//Pass the view ID and SelectedID
SelectField('{ED49DA87-0864-41A5-A153-8DB45BC43309}','1');
return false;
}
$(document).ready(function() {
initjLoadMe();
});
</script>
Happy coding.
No comments:
Post a Comment