Forum Moderators: open

Message Too Old, No Replies

scrollbar on fullscreen

         

outdoorxtreme1

4:10 pm on Aug 11, 2006 (gmt 0)

10+ Year Member



How do I get a scrollbar for the following line of code?

echo '<a href="javascript:void(0);" onclick="fullScreen(\'/uploads/File/',$row['map'],'\');">Map</a><br>';

I am using new_window_max.js script if that helps.

[edited by: outdoorxtreme1 at 4:14 pm (utc) on Aug. 11, 2006]

Birdman

4:14 pm on Aug 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You probably need to add scrollbars=1 to your window.open():

Look at the actual function, FullScreen(). In that, you should find something like this:

window.open(theURL, '', 'fullscreen=1');

Now change it to this:

window.open(theURL, '', 'fullscreen=1, scrollbars=1');

outdoorxtreme1

4:22 pm on Aug 11, 2006 (gmt 0)

10+ Year Member



Here is what the script looks like. I tried changing it but I still dont have the scroll bar.

<!--

var str = "left=0,screenX=0,top=0,screenY=0";

if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
str += ",height=" + ah;
str += ",innerHeight=" + ah;
str += ",width=" + aw;
str += ",innerWidth=" + aw;
} else {
str += ",resizable"; // so the user can resize the window manually
}

function fullScreenScrollbar(theURL) {
return window.open(theURL, '', str, 'scrollbars=1');
}

// -->

Birdman

5:02 pm on Aug 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmm...in your example link you are calling the FullScreen() function but the function you provided in your last post is called FullScreenScrollbar().

Perhaps you just need to alter your link to:

echo '<a href="javascript:void(0);" onclick="fullScreenScrollbar(\'/uploads/File/',$row['map'],'\');">Map</a><br>';

If that is not the case, we need to see the actual FullScreen() function.

outdoorxtreme1

5:04 pm on Aug 11, 2006 (gmt 0)

10+ Year Member



I altered that already. The script is above.

outdoorxtreme1

5:25 pm on Aug 11, 2006 (gmt 0)

10+ Year Member



I got it to work. I had to add this line:

str += ",scrollbars=1";

Here is the full script:

<!--

var str = "left=0,screenX=0,top=0,screenY=0";

if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
str += ",height=" + ah;
str += ",innerHeight=" + ah;
str += ",width=" + aw;
str += ",innerWidth=" + aw;
str += ",scrollbars=1";
} else {
str += ",resizable"; // so the user can resize the window manually
}

function fullScreenScrollbar(theURL) {
return window.open(theURL, '', str);
}

// -->