Forum Moderators: open
whatever.htm has a bunch of headlines and a quick blurb about a topic. When the user clicks on the "read more..." link I would like a window to pop open that is resized to fit only the text and the image on that new page.
I figured that if I gave article1, article2, etc all specific widths and heights the JS/PHP needed to get the window to resize would be easier...
Help please?
window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
window.open("Sample.htm",null, "height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
You would have to replace those with paremeters
e.g.
window.open("Sample.htm",null, "height="+articleheight+",width="+articlewidth+",status=yes,toolbar=no,menubar=no,location=no");
Which means you'll have to figure out some way of measuring the width and height of the content based on whatever type specifications will apply, either hard set by CSS or influenced by the user's text size settings, and include any wrapping, paragraph spacing, and extraneous margins/toolbars etc. that will be included.
For any browser.
I'm going to hang on this thread and watch, because if there's an answer to it I **REALLY** want to hear it! :-)
So you can gather my input is "can't be done."