Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Manipulating the Browser

Reply
Thread Tools

Manipulating the Browser

 
 
Munkeyjunkey
Guest
Posts: n/a
 
      09-29-2006
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

 
Reply With Quote
 
 
 
 
Harlan Messinger
Guest
Posts: n/a
 
      09-29-2006
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Manipulating the Browser Munkeyjunkey HTML 2 09-29-2006 04:23 PM
Manipulating with the T1, T0 and TX in a SAIF file. Kelvin Tsai @ Singapore VHDL 0 09-09-2003 01:46 AM
Manipulating HashTables Andrew Sweetman ASP .Net 2 08-22-2003 10:32 PM
manipulating an image file in asp.net with C# Will ASP .Net 2 08-11-2003 12:46 AM
Manipulating a User Control from another User Control Tom Rowton ASP .Net 2 08-01-2003 08:18 PM



Advertisments