adding small bit of text to iframe print function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AngelStar
    New Member
    • Jun 2012
    • 1

    #1

    adding small bit of text to iframe print function

    Hi,

    I know this is probably going to be a really easy question, but i'm quite new to this and am a little stumped.

    I have an iframe print function that prints just the blog post it is on, but i was to add a bit of copy onto the bottom of the page... how can I do this? Below is the script I am using, I have tried replacing 'ifmcontentstop rint'with the text, no luck any suggestions would be very welcome:

    Here's the code:
    Code:
    // Print recipe using iframe
    function printRecipe(){
        var content = document.getElementById("recipe");
        var pri = document.getElementById("ifmcontentstoprint").contentWindow;
        pri.document.open();
        pri.document.write(content. innerHTML);
        pri.document.close();
        pri.focus();
        pri.print();
    }
    Last edited by acoder; Jun 26 '12, 04:52 PM. Reason: Please use [code] tags when posting code
Working...