Click to See Complete Forum and Search --> : getting rid of scrollbar...


nash
08-27-2003, 02:20 PM
:( I've got a problem, I've made a "borderless pop-up" script but when it opens there's always a scrollbar whatever I do...

Is there a way to get rid of it?

Here's the script:

<HTML>
<HEAD><TITLE>page 1</TITLE>
<SCRIPT LANGUAGE="JavaScript">

/* VARIABLES */
ejs_pf_width = 710;
ejs_pf_height = 530;
ejs_pf_file = 'case_report.html';
ejs_pf_X = 45;
ejs_pf_y = 35;

/* HTML */
ejs_pf_html = '<HTML><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>';
ejs_pf_html += '<iframe src="'+ejs_pf_file+'" framespacing=0 frameborder=no scrollbars=0 scrolling=no width=100% height=100%></iframe></BODY></HTML>';


/* WINDOW */
function ejs_pf_open()
{
if(document.all&&document.getElementById)
{
ejs_pf_pop = window.open('about:blank','ejs_pf_pop','fullscreen');
ejs_pf_pop.moveTo(ejs_pf_X,ejs_pf_y);
ejs_pf_pop.resizeTo(ejs_pf_width,ejs_pf_height);
ejs_pf_pop.document.write(ejs_pf_html);
}
else
{
ejs_pf_pop = window.open('about:blank','ejs_pf_pop','toolbar=0,location=0,directories=0,status=0,scrollbars=0,res izable=0,copyhistory=0,menuBar=0,width='+ejs_pf_width+', height='+ejs_pf_height+', top='+ejs_pf_y+', left='+ejs_pf_X);
ejs_pf_pop.document.write(ejs_pf_html);
}
}

</SCRIPT>
</HEAD>
<BODY>

<P><A HREF=javascript:ejs_pf_open()>Case report</A></P>
</body>
</html>

soccer362001
08-27-2003, 02:26 PM
<style type="text/css">
<!--
body
{
overflow:hidden
}
-->
</style>

nash
08-27-2003, 02:46 PM
I tried that, but it doesn't work...
It's the iframe that displays a scrollbar whatever I do...:(

soccer362001
08-27-2003, 02:58 PM
<script language="JavaScript">
<!-- Begin
function popupPage() {
var page = "http://www.whatever.com";
windowprops = "height=400,width=500,location=no," + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
window.open(page, "Popup", windowprops);
}
// End -->
</script>

<body onLoad="setTimeout('popupPage()', 5);">

nash
08-27-2003, 03:49 PM
Sorry, but I think you didn't get it...

My script is fine... I want a borderless pop-up
to appear when a link is clicked... It works fine!

Now, I have to use a iframe inside the pop-up
to be able to navigate inside the pop-up...
My only problem is with the iframe scrollbar that,
even if the iframe content does NOT require scrolling,
keeps appearing nevertheless...

My only question is: "Can anyone see what I should
add to my script to make the scrollbar disappear?"

nash
08-27-2003, 04:13 PM
If you want to actually see the problem, click here (http://www.geocities.com/nash_sw2001/violet/test.html) and when the page will have loaded click on "Case Report"...

The pop up will appear and you'll see the scrollbar that troubles me...:confused:

soccer362001
08-27-2003, 05:08 PM
If you use this you won't have to have an Iframe.

<script language="JavaScript">
<!-- Begin
function popupPage() {
var page = "http://www.whatever.com";
windowprops = "height=400,width=500,location=no," + "scrollbars=yes,menubars=no,toolbars=no,resizable=yes";
window.open(page, "Popup", windowprops);
}
// End -->
</script>

nash
08-27-2003, 06:26 PM
Excuse me soccer, but I see two problems with your script: First, it auto-opens the pop-up on load...
I want the pop-up to be opened when the link is clicked!
IE displays the border of the window with your script...
I want a borderless pop-up!
Thus, I can't use that script for what I want to do...

The link I've posted above is just a "beta version" of the
page, with the final version, the link will be in the middle
of a page full with text...

I know that the only way to get a borderless pop-up is to code
it like I did... But the script I used was made for images pop-
ups, not to display a frameset, I think it's where I got in
trouble, trying to get my frameset in there!

One solution would be to get rid of the <iframe> but I don't
know how to code the whole fameset that the pop-up should
contain...

I'm really stuck with that one:( :( :(

nash
08-27-2003, 06:45 PM
I have tried to edit my pop-up script to include the frameset in it, but now I keep getting errors when I click on the link (line 1, Char 1, Object expected):confused:

Here's the part I've edited:
/* HTML */
ejs_pf_html = '<HTML><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>';
ejs_pf_html += '<FRAMESET border=0 frameSpacing=0 rows=27,482,21 frameBorder=0>';
ejs_pf_html += '<FRAME name=header marginWidth=0 marginHeight=0 src="files/topframe.html" scrolling=no target="main">';
ejs_pf_html += '<FRAME name=middle marginWidth=0 marginHeight=0 src="files/history.htm" noResize target="_self">';
ejs_pf_html += '<FRAME name=bottom marginWidth=0 marginHeight=0 src="files/bottomframe.html" scrolling=no target="main">';
ejs_pf_html += '<NOFRAMES><body topmargin="0" leftmargin="0">';
ejs_pf_html += '<p align=center>This page uses frames, but your browser does not support them.</p>';
ejs_pf_html += '</BODY></NOFRAMES></FRAMESET></HTML>';

I have uploaded the edited version of the script here (http://www.geocities.com/nash_sw2001/violet/test2.html):(

soccer362001
08-27-2003, 09:20 PM
Change this scrollbars=0 to this scrollbars=yes and get rid of the Iframe

gcrowan
08-27-2003, 10:10 PM
Are you interested in a full screen popup without scrollbars?

<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
window.defaultStatus='your_site.com';
var flag = true;
function fw(){
var windowW = 350;
var windowH = 250;
var windowX =10
var windowY =10
s = "width="+windowW+",height="+windowH;
PFW = window.open("","popFrameless","fullscreen,"+s);
PFW.resizeTo(windowW,windowH);
PFW.moveTo(windowX,windowY);
var frameString=""+
"<html><head><title>OK</title></head>"+
"<frameset rows='*,50' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='main.html' scrolling='no'>"+
"<frame name='bottom' src='nav.html' scrolling='no'>"+
"</frameset>"+
"</html>"
PFW.document.open();
PFW.document.write(frameString);
PFW.document.close();
}
//-->
</script>
</head>

<body>

<a href="javascript:fw();">here</a>

</body>
</html>

nash
08-28-2003, 06:40 AM
Soccer, I don't want scrollbars, and if I knew how to get rid of the iframe I would...
But it's the only solution I could come up with for the moment!

gcrowan, I want a borderless pop-up that doesn't appear on load but on click,
and which can contain a frameset...
I have posted a link to the working version of it... (click then click on "case report") (http://www.geocities.com/nash_sw2001/violet/test.html)
My problem is that the iframe scrollbar always shows whatever I do...:(

soccer362001
08-28-2003, 09:19 AM
Try this

scrollbars=no

gcrowan
08-28-2003, 10:11 PM
I have uploaded the popup with your solution.

http://www.handyathome.com/texasimage/misc/framelesspopup.html

It's true!