Skip to main content
deleted 3 characters in body
Source Link
Summer
  • 4.5k
  • 2
  • 21
  • 59

You can put your content into a <div id="recipeXYZ"> nested normally within your blog post. Then you can load the content to a print page dynamically. Now you can print from your original page, with its images and story, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

To generate the print page just add the button:

<span id="printPreview">printer friendly version (requires javascript)</span>

$("#printPreview").click(function(){
    var w = window.open(); // you can change the dimenstions of the window here.
    w.document.open().write("recipeXYZ.hml""#recipeXYZ");
    // you probably want to create the actual print button here.
});

You can put your content into a <div id="recipeXYZ"> nested normally within your blog post. Then you can load the content to a print page dynamically. Now you can print from your original page, with its images and story, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

To generate the print page just add the button:

<span id="printPreview">printer friendly version (requires javascript)</span>

$("#printPreview").click(function(){
    var w = window.open(); // you can change the dimenstions of the window here.
    w.document.open().write("recipeXYZ.hml");
    // you probably want to create the actual print button here.
});

You can put your content into a <div id="recipeXYZ"> nested normally within your blog post. Then you can load the content to a print page dynamically. Now you can print from your original page, with its images and story, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

To generate the print page just add the button:

<span id="printPreview">printer friendly version (requires javascript)</span>

$("#printPreview").click(function(){
    var w = window.open(); // you can change the dimenstions of the window here.
    w.document.open().write("#recipeXYZ");
    // you probably want to create the actual print button here.
});
deleted 231 characters in body
Source Link
Summer
  • 4.5k
  • 2
  • 21
  • 59

You could keep the recipe in its own source file.can put your content into a recipeXYZ.html<div id="recipeXYZ"> for example. You then dynamically add that source to bothnested normally within your blog post as well as your simplified print page. My jQuery isThen you can load the content to a bit rusty but something from this SO question should work wellprint page dynamically.

$("#recipeDiv").load("recipeXYZ.html");

Now you can print from your original page, with its images and story, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

TheTo generate the print page can even be generated dynamically.just add the button:

<span id="printPreview">printid="printPreview">printer preview<friendly version (requires javascript)</span>

$("#printPreview").click(function(){
    var w = window.open(); // you can change the dimenstions of the window here.
    w.document.open().write("recipeXYZ.hml");
    // you probably want to create the actual print button here.
});

You could keep the recipe in its own source file. recipeXYZ.html for example. You then dynamically add that source to both your blog post as well as your simplified print page. My jQuery is a bit rusty but something from this SO question should work well.

$("#recipeDiv").load("recipeXYZ.html");

Now you can print from your original page, with its images, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

The print page can even be generated dynamically.

<span id="printPreview">print preview</span>

$("#printPreview").click(function(){
    var w = window.open(); // you can change the dimenstions of the window here.
    w.document.open().write("recipeXYZ.hml");
    // you probably want to create the actual print button here.
});

You can put your content into a <div id="recipeXYZ"> nested normally within your blog post. Then you can load the content to a print page dynamically. Now you can print from your original page, with its images and story, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

To generate the print page just add the button:

<span id="printPreview">printer friendly version (requires javascript)</span>

$("#printPreview").click(function(){
    var w = window.open(); // you can change the dimenstions of the window here.
    w.document.open().write("recipeXYZ.hml");
    // you probably want to create the actual print button here.
});
added 365 characters in body
Source Link
Summer
  • 4.5k
  • 2
  • 21
  • 59

You could keep the recipe in its own source file. recipeXYZ.html for example. You then dynamically add that source to both your blog post as well as your simplified print page. My jQuery is a bit rusty but something from this SO question should work well.

$("#recipeDiv").load("recipeXYZ.html");

Now you can print from your original page, with its images, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

The print page can even be generated dynamically.

<span id="printPreview">print preview</span>

$("#printPreview").click(function(){
    var w = window.open(); // you can change the dimenstions of the window here.
    w.document.open().write("recipeXYZ.hml");
    // you probably want to create the actual print button here.
});

You could keep the recipe in its own source file. recipeXYZ.html for example. You then dynamically add that source to both your blog post as well as your simplified print page. My jQuery is a bit rusty but something from this SO question should work well.

$("#recipeDiv").load("recipeXYZ.html");

Now you can print from your original page, with its images, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

You could keep the recipe in its own source file. recipeXYZ.html for example. You then dynamically add that source to both your blog post as well as your simplified print page. My jQuery is a bit rusty but something from this SO question should work well.

$("#recipeDiv").load("recipeXYZ.html");

Now you can print from your original page, with its images, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

The print page can even be generated dynamically.

<span id="printPreview">print preview</span>

$("#printPreview").click(function(){
    var w = window.open(); // you can change the dimenstions of the window here.
    w.document.open().write("recipeXYZ.hml");
    // you probably want to create the actual print button here.
});
Source Link
Summer
  • 4.5k
  • 2
  • 21
  • 59
Loading