+ Start a Discussion
Subhrajyoti NathSubhrajyoti Nath 

Not allow the screenshot to appear in the vf page

User-added image 

Hi guyz,

The picture of my vf page is given above, first one is the original vf fields and second one is the screenshot of the page generated using html2Canvas. I donot want the screenshot to appear in the vf page though the screenshot of the  vf page should be taken in background.
Please help me with this.


 
Jim RaeJim Rae
Can you post your code? Are you using the VF tags, or standard HTML Tags to generate the radio buttons?
Subhrajyoti NathSubhrajyoti Nath

<apex:pageBlock title="Find_Quotes" id="pgblck"> <div style="text-align:center; margin:auto;"> <apex:pageMessages id="showmsg"></apex:pageMessages> <table border="1" style="empty-cells: hide;"> <tr> <td width="100px" height="30px" valign="top"> <apex:pageBlockSection columns="1" showHeader="true" title="Search Account" collapsible="false" > <div align="center" style="margin:auto;"> <apex:inputText value="{!inputValue}" style="width:220px" > <apex:actionSupport event="onkeyup" action="{!getAccounts}" /> </apex:inputText> </div> </apex:pageBlockSection> <div align="center"> <apex:commandButton action="{!search}" value="Search" id="theButton" style="width:50px" /> <apex:commandButton action="{!clearAcc}" value="Clear" style="width:50px" disabled="{!if((inputValue==Null),true,false)}" /> </div> </td> <td width="70px" style="display: {!IF(ISBLANK(hide_acctd), 'none', 'table-definition')};" ></td> <!-- style="display: {!IF(ISBLANK(hide_acctd), 'none', 'table-definition')};" --> <td valign="top" style="display: {!IF(ISBLANK(hide_acctd), 'none', 'table-definition')};"> <!-- style="display: {!IF(ISBLANK(hide_acctd), 'none', 'table-definition')};"--> <div style="margin-top:-15px;" > <apex:pageBlockSection columns="1" showHeader="true" title="Account" rendered="{!showAccount}" collapsible="false" id="pgblsctn" > <apex:selectRadio value="{!accName}" layout="pageDirection"> <apex:selectOptions value="{!accounts}" /> <apex:actionSupport event="onchange" action="{!getOpportunities}" /> </apex:selectRadio> </apex:pageBlockSection> </div> </td> </tr>
 
Subhrajyoti NathSubhrajyoti Nath
I am using vf tags
 
Subhrajyoti NathSubhrajyoti Nath
window.onload=function(){
            html2canvas(document.body,
            {
                useCORS: true,
                onrendered: function(canvas)
                {
          //           document.getElementById("mapDiv").style.display = 'none';
                    document.body.appendChild(canvas);
                  
                }
            });
        }




And this is the javascript i am using to take screenshot