Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. public Contact objAcc {get;set;}
  2. public string strAccId {get;set;}
  3.  
  4. public void createContact()
  5. {
  6. insert objAcc;
  7. }
  8.  
  9. <apex:outputPanel id="popup">
  10. <div id="selectColumnPopup" style="display:none;">
  11. <div class="popupBackground" layout="block" />
  12. <div class="popupForeground" style="height:40%; width:43%;" >
  13. First Name: <apex:inputField value="{!objAcc.FirstName}" /><br />
  14. Last Name: <apex:inputField value="{!objAcc.LastName}" /><br />
  15. <apex:commandButton value="Save" action="{!createContact}" />
  16. <apex:commandButton value="Cancel" onClick="closePopUp()"/>
  17. </div>
  18. </div>
  19. </apex:outputPanel>
  20.  
  21. <apex:outputPanel id="acc1" layout="none" rendered="{!accountList.size!=0}">
  22. <apex:repeat id="repeatAccount" value="{!accountList}" var="item">
  23. <tr>
  24. <td class="dataCell"><Input type="button" value="Create New Contact" onclick="displayPopUp('{!item.oAccount.Id}')"/></td>
  25. </tr>
  26. </apex:repeat>
  27. </apex:outputPanel>
  28. </apex:form>
  29.  
  30. <script>
  31.  
  32. function displayPopUp(accountId)
  33. {
  34. alert('here : '+accountId);
  35. accActionMethod(accountId);
  36. document.getElementById('selectColumnPopup').style.display = 'block';
  37. }
  38.  
  39. function closePopUp()
  40. {
  41. document.getElementById('selectColumnPopup').style.display = 'None';
  42. }
  43.  
  44. </script>
  45. </apex:pageBlock>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement