In addition to this blog I also have a blog about recipes. I decided that I wanted a print icon on the main page for each post so that people can print the recipes. Googling provided various suggestions, none of which worked. تاہم, I eventually cobbled together the following, which seems to work…
<!-- email post links -->
Above that put the following…
[javascript]&لیفٹیننٹ;سکرپٹ>
function printPost(postUrl)
{
doPrint = true;
var pw = window.open(postUrl);
}
اگر(opener.doPrint == true)
{
window.print();
window.onfocus = function() { window.close(); }
}
&لیفٹیننٹ;/سکرپٹ>
&لیفٹیننٹ;a expr:href=’"javascript:printPost(" + """ + کے اعداد و شمار:post.url + """ + ");"’>&لیفٹیننٹ;img src=’http://siteresources.worldbank.org/images/Print_plain.gif’/>&لیفٹیننٹ;/ایک>[/javascript]
And you’re done!
Credit in various parts goes to…
Consuming Experience
Blogger Plugins
Sharkysoft
ہم کچھ یاد ہے لگتا ہے? ہم سے ذیل میں تبصرہ کی طرف سے بتائیں. آپ کے سبسکرائب کرنا چاہتے ہیں تو سب سے اوپر دائیں مینو پر لنک سبسکرائب استعمال کریں. آپ بھی ذیل سماجی روابط کا استعمال کرتے ہوئے کی طرف سے اپنے دوستوں کے ساتھ اس کا اشتراک کر سکتے ہیں. چیرس.
جواب چھوڑیں