Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    easy question but im dumb....window size

    Im an idiot when it comes to java so here it goes. I'm launching a html file from a cd with an auto launch inf. The html file I want to launch (launch.htm) needs to be centered and in a 396x433 window. Is there something I can put in the head to make the window this fixed size with no scrollbars explorer ect. I cant find this script other than as a popup and dammit i dont want a popup the autolaunch.inf alrady takes care of that. any help?

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    you can use:
    window.moveTo(x, y) and window.resizeTo(w, h) methods.
    http://www.devguru.com/Technologies/...ef/window.html

    To remove the scrollbars:
    <body scroll="no">
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    by any chance could you write the code out for me? and does it go in the head or body of the html document. As i said I've never used java before so this is all new to me. Sorry for being an idiot. I'd learn it for myself if it weren't for a project due in 2 days.

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <script>
    width=433;
    height=396;
    
    centerX=screen.width/2-width/2;
    centerY=screen.height/2-height/2;
    
    
    window.resizeTo(width, height);
    window.moveTo(centerX, centerY);
    
    </script>
    <body scroll=no></body>
    the explorer etc. I don't think u can remove once the page is loaded but hey it IE I migth be wrong :P

  • #5
    New Coder
    Join Date
    Jan 2004
    Posts
    56
    Thanks
    2
    Thanked 0 Times in 0 Posts
    mybleedinheart

    Im trying to do a similar thing

    did you ever get this to work,

    the window resize works for me,

    but getting rid of the scrollbars, tool bar etc - I cant get that to work??

    thanks

    Masten

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    You can't get rid of the toolbars, menubars, address bars in the parent window (not opened by window.open()). But the scrollbars you can, but it only works in IE.

    <body scroll="no">

    Removing the scrollbars is an accessibility problem. That's why, AFAIK, only IE supports it.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #7
    New Coder
    Join Date
    Jan 2004
    Posts
    56
    Thanks
    2
    Thanked 0 Times in 0 Posts
    glengv

    I set the behaviour in the link which got round the whole problem - but thanks anyway

    M


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •