Implementing a JavaScript tree is one of those really vexing challenges. Some implementations limit your ability to nest nodes deep into the tree or are awkward in other ways.
I think this is the best solution I've seen so far.
http://www.destroydrop.com/javascripts/tree/
Refer your friends to this blog:
http://programmingcentral.blogspot.com/
Showing posts with label dynamic. Show all posts
Showing posts with label dynamic. Show all posts
Tuesday, June 5, 2007
Thursday, May 24, 2007
Printing the contents of a IFrame whose content changes dynamically
One of the problems that vexed me recently was how to print
the contents of an IFrame when the content changes dynamically.
- Here is my solution:
Declare a DIV area in the body of the HTML document with an ID attribute value of
"IFrameArea".
Declare a JavaScript function that dynamically assigns an IFrame as the innerHTML
property of the DIV. Note that the dimensions of the IFrame are small. This
has the effect of making it invisible.
function PrintIFrame(SRC)
{
var URL;
URL = (SRC).toString();
document.getElementById('IFrameArea').innerHTML = "<iframe src='"
+ URL + "' height='1' width='1' frameborder='0' ID='MyIFrame' name='MyIFrame'>
</iframe>"
}
- The document that is loaded in the IFrame should have an “onLoad” event
handler declared - onLoad="javascript:PrintDocument()"
delcared in the "Body" tab - The document that is loaded in the IFrame should have a a function to perform
the printing
function SetupToPrint()
{
parent.frames.PrintCounter.focus();
window.print();
}
Refer your friends to this blog:
http://programmingcentral.blogspot.com/
Subscribe to:
Posts (Atom)