You need to sign in to do that
Don't have an account?

Kindly Read the following Scenario
HI, i have checkbox and text dataype i.e status and points, if the status is active then it will enable the point text field otherwise it should be disable the textbox (points) ,so how can i do the validation so kindly let me know ASAP.
<!-- enable Or Disable the Javascript Components using Checkboxes -->
<apex:page id="p1">
<script language="javascript">
function js()
{
var c=document.getElementById("check1").checked;
alert(c);
if(c)
{
document.getElementById("email").disabled=true;
}
else
{
document.getElementById("email").disabled=false;
}
}
</script>
<apex:form id="f1">
<input type="checkbox" id="check1" onclick="return js();"/>
<input type="text" id="email" />
</apex:form>
</apex:page>
This code may be helpful to you.
Thanks
Ankita
Thanks for giving reply,which you have provided a code that is fine but i want to do customization i.e with out using code.
Hi Rakeeb,
This is a visualforce component version of ANKITA's code.
Just copy and paste in a visualforce page and see what is look like.
Chamil's Blog
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Hi
Can you please explain me what is the functionality that is working here.
I don't know why we use this.
And how the parameters are passing from here to javascript function.
Thanks