HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 3rd, 2000, 06:47 AM
richy richy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 22 richy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Can anybody tell me how to get a form, lets say by size 200*200 and i want it in the centre of the screen. the problem at the moment is that i can't find out the screen dimensions. i need this code to work in both netscape and explorer.

Reply With Quote
  #2  
Old August 3rd, 2000, 07:47 AM
richy richy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 22 richy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok. I now have the following code:

tmpstring="scrollbars=no, left=0, 0, width=100, height=100"

newwindow = window.open('disclaimer/disclaimer/disclaimer.htm','newwin2',tmpstring)

This works absolutely fine in Explorer, but the frame is full screen in Navigator. Anyone any ideas?

Reply With Quote
  #3  
Old August 3rd, 2000, 12:14 PM
firepages's Avatar
firepages firepages is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: Perth West Australia
Posts: 741 firepages User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
<script>
function init(){
pageW=document.layers?innerWidth:document.body.offsetWidth;
pageH=document.layers?innerHeight:document.body.offsetHeight;
mdiv=(document.layers)?eval('document.maindiv'):eval('maindiv.style')
mdiv.left=(pageW/2)-100;
mdiv.top=(pageW/2)-100;
}
</script>
<body onload="init()">
<div id="maindiv" style="position:absolute;">
form here
</div>

will center a 200x200 layer in NS4 or IE 4+


------------------
Simon Wheeler
FirePages -DHTML/PHP/MySQL

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > screen size


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway