Click to See Complete Forum and Search --> : Browser sized to image and title?!


timothyjames
04-04-2006, 03:24 PM
Hey,

I am writing in html so would prefer if it can be done in html, but if not JAVA script useful too - If you have a hyperlink to an image which opens in a new browser window (using target) and the image is smaller than the full width of a maximised browser (on standard monitor and settings), is it possible to make the new browser containing the image only as big as the image and a title when it first opens? I can’t find how to do this anywhere, but know I have seen sites where this type of window opens. Hate seeing an image open in a huge browser window with tons of space!!

Cheers

skilled1
04-05-2006, 01:25 PM
well there are two javascripts i know you can use to achieve such a thing, one is the auto page size, where a browser will align itself with it and resize, or you can just have the window defined, and open as such below.

<script type="text/javaScript">
function newpage(p) {

window.open(p,'','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbar s=no,width=640,height=480');
}
</script>

<a href="plant1.htm" onclick="newpage(this.href);return false;">Page One</a>