/    Sign up×
Community /Pin to ProfileBookmark

getting rid of scrollbar…

? 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:

[code=php]<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,resizable=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>[/code]

to post a comment
JavaScript

13 Comments(s)

Copy linkTweet thisAlerts:
@soccer362001Aug 27.2003 — <style type="text/css">

<!--

body

{

overflow:hidden

}

-->

</style>
Copy linkTweet thisAlerts:
@nashauthorAug 27.2003 — I tried that, but it doesn't work...

It's the iframe that displays a scrollbar whatever I do...?
Copy linkTweet thisAlerts:
@soccer362001Aug 27.2003 — <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);">
Copy linkTweet thisAlerts:
@nashauthorAug 27.2003 — 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?"
Copy linkTweet thisAlerts:
@nashauthorAug 27.2003 — If you want to actually see the problem, [url=http://www.geocities.com/nash_sw2001/violet/test.html]click here[/url] 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...?
Copy linkTweet thisAlerts:
@soccer362001Aug 27.2003 — 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>
Copy linkTweet thisAlerts:
@nashauthorAug 27.2003 — Excuse me soccer, but I see two problems with your script:[list]
  • [*]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!
  • [/list]

    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? ? ?
    Copy linkTweet thisAlerts:
    @nashauthorAug 27.2003 — 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)?

    Here's the part I've edited:
    [code=php]/* 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>';[/code]


    I have uploaded the edited version of the script [url=http://www.geocities.com/nash_sw2001/violet/test2.html]here[/url]?
    Copy linkTweet thisAlerts:
    @soccer362001Aug 28.2003 — Change this scrollbars=0 to this scrollbars=yes and get rid of the Iframe
    Copy linkTweet thisAlerts:
    @gcrowanAug 28.2003 — 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>
    Copy linkTweet thisAlerts:
    @nashauthorAug 28.2003 — [b]Soccer[/b], 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!

    [b]gcrowan[/b], I want a [i][b]borderless[/b][/i] 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... [url=http://www.geocities.com/nash_sw2001/violet/test.html](click then click on "case report")[/url]

    My problem is that the iframe scrollbar always shows whatever I do...?
    Copy linkTweet thisAlerts:
    @soccer362001Aug 28.2003 — Try this

    scrollbars=no
    Copy linkTweet thisAlerts:
    @gcrowanAug 29.2003 — I have uploaded the popup with your solution.

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

    It's true!
    ×

    Success!

    Help @nash spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.5,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...