Manipulating the Browser

Discussion in 'HTML' started by Munkeyjunkey, Sep 29, 2006.

  1. Munkeyjunkey

    Munkeyjunkey Guest

    I am trying to manipulate my browser so that when the frames page loads
    it doesn't show all the toolbars, but it isn't working. Below is the
    code I have:

    <!--
    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html;
    charset=windows-1252">
    <script language="JavaScript">
    window.onload=change;

    function change()
    {
    var windowAttributes;

    windowAttributes = 'scrollbars=no';
    windowAttributes += 'toolbar=no';
    windowAttributes += 'menubar=no';

    var windowAttributes += 'top=0';
    windowAttributes += 'left=0';
    windowAttributes += 'width=900';
    windowAttributes += 'height=800';
    }
    </script>
    <title>New Page 2</title>
    </head>
    !-->

    Any ideas on what I am doing wrong?
    Thanks
    Munkeyjunkey
     
    Munkeyjunkey, Sep 29, 2006
    #1
    1. Advertising

  2. Munkeyjunkey wrote:
    > I am trying to manipulate my browser so that when the frames page loads
    > it doesn't show all the toolbars, but it isn't working. Below is the
    > code I have:
    >
    > <!--
    > <head>
    > <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    > <meta name="ProgId" content="FrontPage.Editor.Document">
    > <meta http-equiv="Content-Type" content="text/html;
    > charset=windows-1252">
    > <script language="JavaScript">
    > window.onload=change;
    >
    > function change()
    > {
    > var windowAttributes;
    >
    > windowAttributes = 'scrollbars=no';
    > windowAttributes += 'toolbar=no';
    > windowAttributes += 'menubar=no';
    >
    > var windowAttributes += 'top=0';
    > windowAttributes += 'left=0';
    > windowAttributes += 'width=900';
    > windowAttributes += 'height=800';
    > }
    > </script>
    > <title>New Page 2</title>
    > </head>
    > !-->
    >
    > Any ideas on what I am doing wrong?


    Almost everything.

    First of all, your users have their browsers set up the way they want
    them. Who are you to decide that they shouldn't have toolbars or menu
    bars or scrollbars in their browsers? I'm not sure that you can change
    those configurations at all on an open window anyway. And on the rare
    occasion that I've visited a site that changed my browser's dimensions,
    I've left the site immediately, annoyed and nervous about what else the
    site's creator might think it's OK to do to my machine.

    Besides that, you're defining a Javascript variable with "var", local to
    the "change" function, called windowAttributes. Then you're setting it
    equal to:

    "scrollbars=notoolbar=nomenubar=no"

    Then you're creating the same variable AGAIN with "var" and appending

    "top=0left=0width=900height=800"

    Assuming the function executes beyond the redefinition (or at all),
    which I think it won't, at the end of the function you have a local
    variable containing a string of characters, and then that variable
    disappears when execution returns from the function. What makes you
    think that the browser configuration will change because you assigned a
    string to a local variable?
     
    Harlan Messinger, Sep 29, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kelvin Tsai @ Singapore

    Manipulating with the T1, T0 and TX in a SAIF file.

    Kelvin Tsai @ Singapore, Sep 9, 2003, in forum: VHDL
    Replies:
    0
    Views:
    729
    Kelvin Tsai @ Singapore
    Sep 9, 2003
  2. Tom Rowton
    Replies:
    2
    Views:
    695
    Tom Rowton
    Aug 1, 2003
  3. Will
    Replies:
    2
    Views:
    574
    Jerry III
    Aug 11, 2003
  4. Andrew Sweetman

    Manipulating HashTables

    Andrew Sweetman, Aug 22, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,227
    Steve C. Orr, MCSD
    Aug 22, 2003
  5. Munkeyjunkey

    Manipulating the Browser

    Munkeyjunkey, Sep 29, 2006, in forum: HTML
    Replies:
    2
    Views:
    364
    Toby Inkster
    Sep 29, 2006
Loading...

Share This Page