Forum Moderators: not2easy

Message Too Old, No Replies

Adding Scrollbar to Pop-up Window

Using a Map

         

rabain

9:43 pm on Sep 29, 2004 (gmt 0)

10+ Year Member



What i want is for visitors to be able to click on part of the map and get a smaller more detailed map with a scrollbar on the pop-up window for those who IE auto-sizes the image for. When i try using IE's facility for to rollover the image to fullsize it doesn't also resize the window, so i need that scrollbar!

I could increase the size of the popup for each image but i don't want that to get out of hand.

This is what i have so far:

function OpenWindow(strURL,strWidth,strHeight)

{ /* open a new browser window based on info passed to the function */
window.open(strURL,"","Width=" + strWidth + ",Height=" + strHeight,0);
}

And image code:

<area alt="Anauroch Desert" nohref coords="298, 33, 425, 158" shape="rect" onClick="javascript:OpenWindow('maps/mapAnauroch.jpg',500,400);">

Be aware that my web skills aren't great, i had to search to find something that worked as the above!

webdude

12:14 pm on Sep 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebMasterWorld Rabain!

This might work. I don't have time to test but you could give it a try...

{ /* open a new browser window based on info passed to the function */
window.open(strURL,"","Width=" + strWidth + ",Height=" + strHeight,0,"scrollbars=yes");
}

rabain

4:19 pm on Oct 1, 2004 (gmt 0)

10+ Year Member



Thanks Webdude - this has been annoying me no end!

Anyway your suggestion didn't quite work but put me on the right track and what i had to do was this:

function OpenWindow(strURL,strWidth,strHeight,strScrollbar)
{
/* open a new browser window based on info passed to the function */

window.open(strURL,"","Width=" + strWidth + ",Height=" + strHeight + ",scrollbars=yes",0);
}

webdude

6:58 pm on Oct 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



oops! Forgot the old + sign.

Well, even though it didn't work, I am glad I got you on the right track.