+ Start a Discussion
Radhika pawar 5Radhika pawar 5 

using jquery: page is reloaded when checkbox is selected.

Hi friend,
I m using jquery for auomatically set check box is true .
In that i want page reloaded for saved in database so 
plz reply me as soon as possible.

Thank you .
Deepak Kumar ShyoranDeepak Kumar Shyoran
You can also use Window.reload to reload the page at same place where you are checking the checkbox or if you want to call the controller then can write a action function and can call that from jquery code.
Radhika pawar 5Radhika pawar 5
plz send me code example ..
Deepak Kumar ShyoranDeepak Kumar Shyoran
Here are two sample code first one is to call action function and second one is call javascript function during onChage event for checkbox. 
1.
<apex:actionFunction name="actionFunciton" action="{!methodName} />
<apex:selectCheckboxes value="{!countries}" onchange="actionFunciton();">
  <apex:selectOptions value="{!items}"/>
</apex:selectCheckboxes><br/>

2.
<scirpt>
function javascriptFunciton() {
window.reload() ;
}
</script>
<apex:selectCheckboxes value="{!countries}" onchange="javascriptFunciton();">
  <apex:selectOptions value="{!items}"/>
</apex:selectCheckboxes><br/>
You can easily modify the above code to meet your requirement.