dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: browser sizing on "enter site" button

  1. #1
    Member
    Join Date
    Jan 2003
    Location
    Houston, TX
    Posts
    37

    browser sizing on "enter site" button

    Hello,

    I am having problems getting my "index.htm" page to resize to a fixed size of 800x375 when the "enter button" is pushed, (I want the current browser window that the "index.htm" is in, to change to 800x375 when it launches the site).

    I have use java script to get it to open another window to the fixed size, but that leaves me with two windows open, (the index and the site), and I would like to have only one window open at a time.

    Maybe I should have the "index window" close?

    Thanks for any help in advanced.

    xcaliber

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    something like

    <a href="where_the_enter_button_goes.html" onclick="resizeTo(800,375);">click to enter</a>

    will change the size of the current window when the link is clicked

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    additionally you can use moveTo(x,y) to reposition the window,

    eg

    onclick="resizeTo(800,375);moveTo(0,0);"

  4. #4
    Member
    Join Date
    Jan 2003
    Location
    Houston, TX
    Posts
    37

    thanks...

    I will give this a shoot. I am not a programmer, and thought this would take forever to figure out.

    You have been a big help!

    Thanks again,

    xcaliber

  5. #5
    Member
    Join Date
    Jan 2003
    Location
    Houston, TX
    Posts
    37

    still puzzled?

    I have put the above code into my Dream Weaver file, and I get the "current browser window" to change size, (which is good), but it changes to a smaller size than 800x375?

    I can change the size to make the browser bigger, but I know the exact size is 800x375, and it should open to that size and not any smaller.

    I would also like to make it without.."scrollbars=no,resizable=no"?

    any insight?

    thanks,

    xcaliber

  6. #6
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    maybe just create a new blank window instead of tying to modify the existing one,

    <script type="text/javascript">
    function openWindow(url, name, features) {
    newWindow = window.open(url, name, features);
    }
    </script>

    <body onload="openWindow('filename.html','newWin','width =800,height=375');">

    would open a new window without any decorations (scrollbars, status bar etc)

  7. #7
    Member
    Join Date
    Jan 2003
    Location
    Houston, TX
    Posts
    37
    Below is the code I have now. It works, but it leaves open the start up page (index.htm splash page). Once you hit the "enter button", another page opens up, launching the "site", but leaving the "index" page still open.

    Is there a way to make the "index page" close once the "enter button" is pushed? This would leave open only the "site" window.

    Here is the current code:

    <a href="javascript:Launch('http://www.site.com/intro.html')"

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function Launch(page) {
    OpenWin = this.open(page, "site", "toolbar=yes,menubar=yes,location=yes,scrollbars=n o,resizable=no,width=800,height=375");
    }
    // End -->
    </SCRIPT>


    I hope this makes sense.

    Thanks,

    xcaliber

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center