Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
call a controller in image src for the print function but the image src is not loded when the controller sends back response.

"

<label>1/2/2015</label>

\n\n

<label>Acc staff</label>

\n\n

<label>prx</label>

\n\n

<label>certicate for ct</label>​

\n\n

<label><img src='/local/api/file/Downloadfile?rG=547e49dc-d4c8-4b78-9255-1ecfd4e422d7' alt='Download' /></label><label><img src='/local/api/file/Downloadfile?rG=547e49dc-d4c8-4b78-9255-1ecfd4e422d7' alt='Download' /></label>

\n"

is my content

as u see src is the contoller url and file is the controller name and downloadfile is the function where is src is created



XML
var $popupDiv = $("<div id='printCertificateDiv' style='padding-top: 10px;' > " +
                              "<div class='cmc-form-FieldGroup bluebox-colspan-1 cmc-roundedCorner'>" +
                              content +
                              "</div>").appendTo(document.body);

            // this code is added to show print preview in Ie-8
            if (cmc.functions.browser.IsIE()) {

                var divToPrint = document.getElementById('printCertificateDiv');
                newWin = window.open();
                newWin.document.write(divToPrint.innerHTML);
                newWin.location.reload();
                newWin.focus();
                newWin.print();
                newWin.close();
                $("#printCertificateDiv").remove();

is my jquery code
please help
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900