473,698 Members | 2,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting to Control Position of Browser

Can you put commands in an HTML page so that when it opens it will be in the
center of the screen, and possibly even turn off some of the menu bars?
Want to create an [autorun] file on a CD I am publishing and would like to
have it start up in the center of the screen with the index.htm file on the
CD.
Jul 20 '05 #1
2 2625
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Al Franz wrote:

| Can you put commands in an HTML page so that when it opens it will be
in the
| center of the screen, and possibly even turn off some of the menu bars?
| Want to create an [autorun] file on a CD I am publishing and would like to
| have it start up in the center of the screen with the index.htm file
on the
| CD.
|
|
With javascript:

| [...]
| <head>
|
| <script language="javas cript">
|
| function winOpen(theURL, Name, popW, popH, scroll) {
| var winleft = (screen.width - popW) / 2;
| var winUp = (screen.height - popH) / 2;
| winProp =
'width='+popW+' ,height='+popH+ ',left='+winlef t+',top='+winUp +',scrollbars=' +scroll+',resiz able'
| Win = window.open(the URL, Name, winProp)
| if (parseInt(navig ator.appVersion ) >= 4) { Win.window.focu s(); }
| }
|
| </script>
|
| </head>
|
| <body onload="winOpen (
| 'http://www.yoursite.co m',
| 'name','width', 'height','scrol l yes/no'
| )">
| [...]

- --
Martin Trenker -||- Webauthor and Human!
da****@teh.mooo .com -||- http://www.clanwork.net
PGP: 0xCC93857F -||- http://www.daroot.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQE/03KFdSofxcyThX8 RAqsUAKCpKPXs1j IUKxgOOxQQPJfsO hk8pQCcDFw7
j286KG5E7vryzJP TWIn62Gg=
=h5WY
-----END PGP SIGNATURE-----
Jul 20 '05 #2
Al Franz wrote:
Can you put commands in an HTML page so that when it opens it will be in
the center of the screen, and possibly even turn off some of the menu
bars? Want to create an [autorun] file on a CD I am publishing and would
like to have it start up in the center of the screen with the index.htm
file on the CD.


First of all, HTML tags aren't commands. Second, there's no way to do this
reliably, in HTML or otherwise.

--
Shawn K. Quinn
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3022
by: Joe Helmick | last post by:
This one has me really stumped, so I thought I'd ask publicly. I was trying to take my ASP.NET web page "template" -- banner graphic, small navigation bar, and user feedback message area -- and make it into a user control. I wanted to stretch one of the graphics so it always went all the way across the browser window. So far, so good... And then, I wanted to take the two-cell table that holds the naviagation bar and make it always...
2
1698
by: lawrence | last post by:
I thought I was fighting a PHP problem, so I asked about this on a PHP list, but they felt it was a Javascript problem, so I'm reposting a bit of the debate here. Could this Javascript, below, possibly trigger a redirect in Netscape, and send the browser to a file called "0". Cause what is happening is on load, in Netscape, the page redirects to something like: http://www.myDomain.com/0
1
2382
by: cindy | last post by:
I have a web form I checked body tag it is <body ms_positioning="FlowLayout"> I load a user control on form, all the textboxes position like they are in grid layout I cannot drag them. What am i missing I am doing something really dumb please help me. -- cindy mello
7
11091
by: tom | last post by:
Hi, I want a listbox below a hidden calendar control. The problem is that the listbox will shadow the calendar when the calendar is visible. How can I bring the calendar from back to front? Thanks in advance.
9
1396
by: Mactash | last post by:
Folks, I have problem running simplest ASP.Net programs with IIS web server. As a test I just added some text box and dropdown list with Visual Studio but when I run this my page shows nothing.(blank page without error.) I can run this with asp matrix web server. Can you please let me know what is wrong.? Thank you .
2
2577
by: junlia | last post by:
Hi All, I am working on a project that acts as a bridge. It does some checking with post xml data, and then redirects the request to an appropriate page. However, we find that depends on the browser cache setting (and OS), the program behaves differently. This is how it should work: 1. The client program opens a webbrowser control, using navigate2 method to post xml data to my aspx pages, eg abc.aspx
0
2999
by: chris | last post by:
I'm using the code below to attempt to find out the absolute pixel position of an element inside an activex web browser control (axWebBrowser). This example uses the 'www.google.co.uk' web page and attempts to find the position of the editbox where the search critera is enetered. My problem I'm having is that the result is always near the element but never exact (in this case, the left co-ordinate seems to be 7 pixels to high).
2
10719
by: Sreenath Rao Nellutla | last post by:
Hai all, I am trying to create dropdown calendar control with HTML input control by writing JavaScript. But while executing I am getting the error as "Error on Page" on the status bar of the browser. I wrote the following code in the HTML code for the web form: <%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false" Inherits="calendar.WebForm2" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML>...
3
2515
by: =?Utf-8?B?Qw==?= | last post by:
Hi, I have a user control which I use on all my pages. The control is situated on the top of my page (sits on my master page). For some long pages the user has to scroll back up to the top of the page to select an option from my user control. Can I make this user control floatable so that as the user scrolls down the page the user control moves down also?
3
1548
by: chandan | last post by:
Hi, Is any way to palce a control(button/label) at a location on webPage in runtime?? In page_load envet I am adding a button on the page in the contol collection of a panel but not able to specify the location of the button since button controls did not have location property in web. I am trying to place a control at mouse click position on the page.also I am not getting the mouse down position on the page I am
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.