Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
eddy_declercq
Active Contributor
0 Kudos

One of my first web logs covered a How to print an SDN forum thread in Firefox in a nice and easy way to print the S(D)N forums in a nice and easy way. It covered a solution to print a forum thread without the S(D)N headers and menu, in order to have more room for the thread itself, and for it to fit perfectly on an A4/letter. This was done via a simple Javascript saved as bookmarklet. A couple of months later, I published a similar web Super (re)size it. for printing web logs. With the migration of S(D)N to Netweaver 2004, things changed a bit and the earlier mentioned bookmarklets didn’t run anymore. As such there isn’t that much difference though. The only thing that needs to be changed is the frame id, which is now called “isolatedWorkArea”.




So for the web log printing, it comes to


 


javascript:id=document.getElementById(%22isolatedWorkArea%22).contentWindow;

ta=id.document.getElementsByTagName(%22TEXTAREA%22);

for(i=0; i<ta.length;i++) {cr=0; idx=ta[i].value.indexOf(%22
%22, 0);

while (idx != -1 ) { cr +;idx = ta[i].value.indexOf(%22
%22, idx
1);}

ta[i].rows=cr;}id.print();

 


Wait a minute. Does the print button in the web log page do the same, with much less code, meaning


javascript:this.window.print();


 


Yes and no. Indeed, it does print the web log without the headers and menu. The difference is that the bookmarklet will expand the textareas and thus prevent it from being cut off to the size of the initial textarea. Check my earlier web Super (re)size it. for details on that.




Next comes the code for forum printing.


javascript:document.getElementById(%22isolatedWorkArea%22).contentWindow.print()


 


Here there are no textareas, but since there is no separate print button within the forums, the existence of the code is still required. Check the other web How to print an SDN forum thread in Firefox in a nice and easy way for details.




Installation is simple. Just create a bookmark/favourite and copy/paste the above. Make sure that everything is on

one line

!


 

1 Comment