Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Contact objAcc {get;set;}
- public string strAccId {get;set;}
- public void createContact()
- {
- insert objAcc;
- }
- <apex:outputPanel id="popup">
- <div id="selectColumnPopup" style="display:none;">
- <div class="popupBackground" layout="block" />
- <div class="popupForeground" style="height:40%; width:43%;" >
- First Name: <apex:inputField value="{!objAcc.FirstName}" /><br />
- Last Name: <apex:inputField value="{!objAcc.LastName}" /><br />
- <apex:commandButton value="Save" action="{!createContact}" />
- <apex:commandButton value="Cancel" onClick="closePopUp()"/>
- </div>
- </div>
- </apex:outputPanel>
- <apex:outputPanel id="acc1" layout="none" rendered="{!accountList.size!=0}">
- <apex:repeat id="repeatAccount" value="{!accountList}" var="item">
- <tr>
- <td class="dataCell"><Input type="button" value="Create New Contact" onclick="displayPopUp('{!item.oAccount.Id}')"/></td>
- </tr>
- </apex:repeat>
- </apex:outputPanel>
- </apex:form>
- <script>
- function displayPopUp(accountId)
- {
- alert('here : '+accountId);
- accActionMethod(accountId);
- document.getElementById('selectColumnPopup').style.display = 'block';
- }
- function closePopUp()
- {
- document.getElementById('selectColumnPopup').style.display = 'None';
- }
- </script>
- </apex:pageBlock>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement