Window: no taskbar

They have: 218 posts

Joined: Apr 2001

The main pop-up window at rush.com conceals the bottom taskbar consistantly...how can that effect be achieved with Javascript?

Thanks,

TonyMontana

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

http://www.zerocattle.com/examples/popUp.html

You can turn on any option -- they should be all off by default for any window opened by JavaScript.

They have: 218 posts

Joined: Apr 2001

Suzanne,

Which parameter is specific to concealing the taskbar?

TM

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

status

Breaking it down:
// width of window
width = xxx,
// height of window
height = xxx,
// history, et cetera
directories = yes,
// address bar
location = yes,
// menu bar
menubar = yes,
// can I resize this or not?
resizable = yes,
// indepent of resizing, if the file is larger than the window, can I scroll?
scrollbars = yes,
// the status bar at the bottom of the screen
status = yes,
// the toolbar
toolbar = yes
// I forget which applies to which, but basically, where the window is on the main screen, one is for Netscape and one is for IE
screenX = xxx,screenY = xxx
top = xxx,left = xxx

Recommended is:

Which sets the width and height only, no other bars, and if someone else's browser is screwy, they can resize it so they can see it if they need to. By fault, everything is OFF (no).

They have: 218 posts

Joined: Apr 2001

Thanks, that's great....but specifically, I just need to know how to hide the taskbar, when blowing up a window to screen resolution size. I tried setting 'status=1' and 'status=no' and both ways, the taskbar was still there...

TM

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Perhaps if you define what "taskbar" means to you? status=no no quotes, should be what you have. URL for example?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Also, be aware that some browsers will stop you from hiding the status bar, eh? Wink Make sure you aren't testing this on a browser that overrides it.

They have: 218 posts

Joined: Apr 2001

The example is http://www.rush.com where the taskbar (what I call the bottom windows screen area with the 'start' button and applications) gets covered when entering the site.

TM

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

ohhh, my goodness, that's a whole other beast.

1. You shouldn't -- you're then messing with people's personal space.

2. You're looking for "fullscreen" settings for the JavaScript popup window.

fullscreen=yes
'

But it's really not recommended. People will get mighty pissed at you.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Or, view their source:

<script language='javascript'>
<!--
var RushPopUpWindow=null;
function RushPopUp(mypage,myname){
w=screen.width;
h=screen.height;
LeftPosition=0;TopPosition=0;settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=no,dependent=no';
RushPopUpWindow=window.open('',myname,settings);
RushPopUpWindow.focus();RushPopUpWindow.location='flash_content/InRush.html'
}
//-->
&lt;/script&gt;
'

They are getting the screen height and width and then setting the window size to that.

They have: 218 posts

Joined: Apr 2001

I'm using this code...and I can't seem to get the effect happening, do you know why?

function initWindow(str){
  
var sW = screen.width;
             var sH = screen.height;

var settings = "'directories=no,status=1,menubar=no,toolbar=no,status=1,dependent=no,scrollbars=1,resizable=1,x=0,y=0,left=0,top=0,height="+sH + ",width="+sW+"'";
var str = str;
var rand = Math.round(Math.random()*9999);
var wName = "winMain" + rand;
     if (sW > 800){
   str += "&smallSwf=0";
    }
else {
str += "&smallSwf=1";
    }
var mainWin = void (window.open(str, wName, settings));
mainWin.focus();

}
'

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Seems like it doesn't like your var names.

Anyway, here you go:

function popUp(page, name, details) {
var newWin
var page
var rand = Math.round(Math.random()*9999)
var w=screen.width
var h=screen.height
var details="status=yes,scrollbars=yes,resizable=yes,screenX=0,screenY= 0,left=0,top=0,height="+h+",width="+w
var name = "winMain" + rand
if (w > 800){
   page += "&smallSwf=0"
    }
else {
page += "&smallSwf=1"
    }
newWin=window.open(page,name,details)
newWin.focus()
return false
}
'

<a href="putyourpageurlhereforaccessibility.html" onclick="return popUp(this.href);">something to activate the link</a>
'

Also, if you don't want to have the same page in the href and the onclick, you can replace popUp(this.href) with popUp('someurl.html'). The function takes this variable as the page name and appends your search query to it.

They have: 218 posts

Joined: Apr 2001

Turns out the var names were ok, the problem was with commas in the settings variable. However, one thing that the Rush site does, is retain the focus of the window.

When I clicked view source and opened a text file on the rush site, the 'taskbar' appeared again, but when I closed the source file window, the taskbar disappeared as the window expanded, or focused.

I haven't been able to achieve that action, if you know how?

function initWindow(str){
  
var sW = screen.width;
    var sH = screen.height;
var mainWin = null;

var LeftPosition=0, TopPosition=0;
var settings='width='+ sW + ',height='+ sH + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=no,dependent=no';
var str = str;
var rand = Math.round(Math.random()*9999);
var wName = "winMain" + rand;
  
  if (sW > 800){
   str += "&smallSwf=0";
  }
else {
str += "&smallSwf=1";

  }
mainWin = void(window.open(str, wName, settings));
mainWin.focus();

}
'

Thanks,

TM

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

um, yes, the part in my code (and Rush's) that says newWin.focus(); or mainWin.focus() -- whatever you've called the window you've opened. They called theirs RushPopUpWindow and so used this line to make it stay focused (while the browser is active only).

RushPopUpWindow.focus();
'

They have: 218 posts

Joined: Apr 2001

The .focus() callback was not being called consistently in my code initially, but it seems to be working now.

TM

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

I've found when editing JavaScript and anything really that changes oodles in a short period of time, sometimes browsers just get all confused and silly and fail to entirely keep up. Wink Glad you got it sorted.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.