• hpPMP
  • 0 Points
  • Member since 2008

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1
My code works like this. I have n number of Lead objects. When I click a checkbox I am trying to pass the value to a javascript function. It is not working. Any help. Also How do i achieve this functionality?

<apex:page controller="registerDomainController" tabStyle="Lead">
function addUsers(userid)
var idsToAdd = new Array();
alert('Before adding' + userid);
<apex:sectionHeader title="Add User">

<apex:facet name="footer">

<apex:pageBlockSection title="Add Users to the Extranet">
<apex:dataTable value="{!allLeads}" var="user" cellspacing="0" cellpadding="4" border="0" width="800px">
<apex:facet name="header">First Name</apex:facet>
<apex:facet name="header">Last Name</apex:facet>
<apex:facet name="header">Email Address</apex:facet>
<apex:facet name="header">Phone number</apex:facet>
<apex:facet name="header">Add User</apex:facet>
<apex:inputCheckbox value="{!user.id}" onclick='addUsers({!user.id})'/>