a validation rule doesnt work . as all i need is a popup to advise the user that the checkbox is ticked and once they click ok, they can save the record
<apex:page standardController="Waiver_Favor__c">
<Script>
function ShowAlert()
{
var busamval = document.getElementById('pagelist:form1:selectionBlock:Final_Approver__c');
if(busamval.checked == false)
{
alert('Are you sure you want to use your Quota');
}
}
</Script></apex:page>
<apex:page standardController="Waiver_Favor__c">
<Script>
function ShowAlert()
{
var busamval = document.getElementById('pagelist:form1:selectionBlock:Final_Approver__c');
if(busamval.checked == false)
{
if(confirm('Are you sure you want to use your Quota')) { //place logic for yes } else { //set checked to true busamval.checked=true; } }
}
</Script> </apex:page>
I suppose you have the page well formed like you have a form with check box present in it. Let me know if it works. Thank you!
pls check the code again as it seems we missd something. when i paste the page link to check out the popup . it opens in accounts with a blank page and not in the custom object we want the popup to open ?
Lewis you can call a javascript method when checkbox is checked.
onClick event will do the work for you.
is there any simpler way as i do not know javascripts
Hi,
Using a Java Script would be an easier way out..This is an example that would show you how to do it..
Use a checkbox and give an ID to it for ex:-
<apex:inputCheckbox id="Chkbox11" />
Now use a Java ecript to call this ID..
Include the following function in your VF page:-
Try and see if you can use Validation Rules to display messages..instead of Java Script
Thanks,
Tulika
thanks tullika .
a validation rule doesnt work . as all i need is a popup to advise the user that the checkbox is ticked and once they click ok, they can save the record
Lewis, in that case try the java script I have posted in my previous message..
i created the VF page as you suggested.
what would be the next step then
you can do it as below:
I suppose you have the page well formed like you have a form with check box present in it. Let me know if it works. Thank you!
Regards,
Lakshman
hi laksman ..
i have setup the page as you suggested . there is a checkbox field in the main page layout that needs to be ticked .
think i am missing something . is there a trigger or something that needs to be created that will trigger this popup when i check the checkbox field ?
pls help.
pls check the code again as it seems we missd something. when i paste the page link to check out the popup . it opens in accounts with a blank page and not in the custom object we want the popup to open ?
https://c.cs2.visual.force.com/apex/test