Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:page standardStyleSheets="false" showHeader="false" sidebar="false" `renderAs="pdf" standardController="SObject" extensions="controller" applyBodyTag="false" action="{!method1}">`
- <div id="mainDiv"></div>
- </apex:page>
- <script>
- Visualforce.remoting.Manager.invokeAction(
- '{!$RemoteAction.class.remoteMethod}',
- '{!$CurrentPage.parameters.bid}',
- function(result, event){
- if (event.status) {
- console.log('---result',result);
- console.log('----event--'+event.status);
- if(result.length >0){
- result.map(function(item,index){
- console.log(index);
- var d1 = document.createElement('div');
- d1.id="dv"+index;
- d1.innerHTML="hello"+index;
- //d1.className = "page-break";
- d1.style.position ="relative !important";
- d1.style.height="1056px";
- d1.style.border = "groove";
- //$("#dv"+index).append(div1);
- $("#mainDiv").append(d1);
- });
- }
- } else if (event.type === 'exception') {
- console.log('----event--'+event.message);
- }
- },
- {escape: true}
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement