i have three rows on my main site
i want that the middle-row resizes (only height) depending on the windows
size
i know it is possible in javascript, but i dont know how ot do it
im more like server-side scripting type of guy
<table align="center" width="100%" height="100%">< tr align="center"
valign="middle" ><td>
<table width="750" align="center" border="0" cellpadding="0"
cellspacing="0" >
<tr>
<td height="50" align="center" valign="top">
<!-- TOP -->
</td>
</tr>
<tr>
<td height=" <!-- RESIZE THIS DEPENDING ON THE WINDOWS SIZE -->
" align="center" valign="top">
<!-- CONTENT -->
</td>
</tr>
<tr>
<td height="50" align="center" valign="bottom" >
<!-- BOTTOM -->
</td>
</tr>
</table>
</td></tr></table> 3 4768
Here is my hack from a year or so back with a similar problem but I
was sizing iFrames.
JsD
<body>
<table align="center" width="100%" height="100%">< tr align="center"
valign="middle" ><td>
<table width="750" align="center" border="1" cellpadding="0"
cellspacing="0" >
<tr>
<td height="50" align="center" valign="top">
top
</td>
</tr>
<tr>
<td id=tdMiddle height=100% align="center" valign="top">
middle
</td>
</tr>
<tr>
<td height="50" align="center" valign="bottom" >
bottom
</td>
</tr>
</table>
</td></tr></table>
<script>
_w=window
_d=document
// General Utility Functions
function winWidth(){retu rn is.ie?_d.body.c lientWidth:_w.i nnerWidth}
function winHeight(){ret urn is.ie?_d.body.c lientHeight:_w. innerHeight}
function ClientSniffer() {//IE5.5+&Mozilla 5+
var t=this, n=navigator,sUA =n.userAgent.to LowerCase(),i
t.ie=false;t.mo z=false
if(
(i=sUA.indexOf( 'msie'))>-1
&&parseFloat(sU A.substring(i+5 ,sUA.length))>= 5.5
){
t.ie=true
}else{
if(sUA.indexOf( 'gecko')!=-1
&&parseInt(n.ap pVersion
)>=5){
t.moz=true
}
}
}; _w.is=new ClientSniffer()
oTD=_d.getEleme ntById("tdMiddl e")
function setIFSize(){
oTD.style.heigh t=winHeight()-100-30
}
_w.onresize=set IFSize
setIFSize()
</script>
</body>
Java script Dude wrote: Here is my hack from a year or so back
It dates back to the stone age, does it not?
[...] <body> <table align="center" width="100%" height="100%">< tr align="center" valign="middle" >
A "table" element does not have a "height" attribute (in Valid HTML).
<td>
<table width="750" align="center" border="1" cellpadding="0" cellspacing="0" > <tr> <td height="50" align="center" valign="top"> top </td> </tr>
<tr> <td id=tdMiddle height=100% align="center" valign="top"> middle </td> </tr>
<tr> <td height="50" align="center" valign="bottom" > bottom </td> </tr> </table>
</td></tr></table>
Never ever use tables for layout purposes alone.
A table is a table is a table. [psf 3.8]
<script>
^^^^ _w=window _d=document
Huh?
// General Utility Functions function winWidth(){retu rn is.ie?_d.body.c lientWidth:_w.i nnerWidth}
^^^^^ function winHeight(){ret urn is.ie?_d.body.c lientHeight:_w. innerHeight}
^^^^^ function ClientSniffer() {//IE5.5+&Mozilla 5+ var t=this, n=navigator,sUA =n.userAgent.to LowerCase(),i t.ie=false;t.mo z=false if( (i=sUA.indexOf( 'msie'))>-1
^^^^^^^^^^^^^^^ ^^^^ &&parseFloat(sU A.substring(i+5 ,sUA.length))>= 5.5
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^ ){ t.ie=true }else{ if(sUA.indexOf( 'gecko')!=-1
^^^^^^^^^^^^^^^ ^^^^^^^^^ &&parseInt(n.ap pVersion )>=5){
^^^^^^^^^^^^^^^ ^^^^^^^^ t.moz=true } } }; _w.is=new ClientSniffer()
oTD=_d.getEleme ntById("tdMiddl e")
^^^^^^^^^^^^^^^ ^^ function setIFSize(){ oTD.style.heigh t=winHeight()-100-30 }
_w.onresize=set IFSize setIFSize() </script> </body>
Eeek. What a load of rubbish.
<http://pointedears.de/scripts/test/whatami>
PointedEars
--
C code. C code run. Run, code, run... PLEASE!!!
Thomas 'PointedEars' Lahn <Po*********@we b.de> wrote in message news:<57******* *********@Point edEars.de>... Java script Dude wrote:
Here is my hack from a year or so back
It dates back to the stone age, does it not?
:] <Code_Snippet >
A "table" element does not have a "height" attribute (in Valid HTML).
Posted this to the wrong node. This should be for Mario's post. <Code_Snippet >
Never ever use tables for layout purposes alone. A table is a table is a table. [psf 3.8]
Same again consistency is a good trait for programmers. _w=window _d=document
Huh?
`window` and `document` are the most commonly used instance variables
and as such, shortening their name will save char space in js sources,
which in any script language is a good thing. I borrowed this
methodology from a very good but now invisible js programmer - Stereo
Frog ( www.stereofrog.com). <Code_Snippet >
Eeek. What a load of rubbish.
Dude, this code was copied and pasted from some abstracted js
libraries. Unfortunately I did not have time to clean it up for the
copy and paste programmers around. BTW - Any decent hacker should be
able to reverse engineer and use.
JsD This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TJ Talluto |
last post by:
<facts>
I have a "month calendar" that always displays exactly 42 days... and
alongside is a vertical box that displays the detail (form fields) of any
particular select event that appears on the calendar, so that the event may
be changed, or a new event may be created.
monthname
X X X X X X X form
X X X X X X X form
X X X X X X X form
|
by: Jozef |
last post by:
I have some old code that I use from the Access 95 Developers handbook. The
code works very well, with the exception that it doesn't seem to recognize
wide screens, and sizes tab controls so that they are too big and wind up
covering up some of the fields on the main form.
Is there any good code out there that works in a similar fashion that will
also either a) stretch the form width wise on widescreens or b), rely on
height rather than...
|
by: John Bowman |
last post by:
Hi All,
I must be missing something really obvious, so I'd appreciate someone
helping me out. I have a simple Windows form that currently only has a title
bar (aka the Text Property is set) and the MinmizeBox, ControlBox and
MaximizeBox(es) are all set to false. It's FormBorderStyle is set to "Fixed
Single". Eventually this form will have a nice background image. I need to
use this form as sort of back drop while other forms/operations...
|
by: Mustufa Baig |
last post by:
Can anybody tell me how or refer me a link where I can find the client side
javascript to make the positions and resizing of the controls on .aspx page
independent of screen resolution. As I am using Grid layout and it uses
pixel units.
Thanks.
|
by: Darren |
last post by:
OK, this should be really simple, but I still can't see where I can set an
option to prevent Windows Media Player 9 from resizing the window when it
loads at startup or when a file is played. I need it to stay one size not
change depending on the videos size.
Any ideas?
Thanks
| |
by: Darren |
last post by:
OK, this should be really simple, but I still can't see where I can set an
option to prevent Windows Media Player 9 SDK from resizing the control on
the form when it loads at startup or when a file is played. It keeps on
covering other controls, I need it to stay one size not change depending on
the videos size.
Any ideas?
Thanks
|
by: Nick ! |
last post by:
Chris Share <usenet at caesium.me.ukwrote:
http://web.cs.mun.ca/~rod/ncurses/ncurses.html#xterm says "The ncurses
library does not catch signal, because it
cannot in general know how you want the screen re-painted". First, is
this really true? When I make my xterms smaller they clip what is
displayed--is that a function of curses or the xterm?
Second, if true, it explains /what/ is going on--stdscr, only--, but
isn't really...
|
by: dli07 |
last post by:
Hello,
I'm trying to convert a piece of code that creates a dynamic vertical resizing bar in a table from internet explorer to firefox. It's based on a post from http://blogs.crankygoblin.com/blogs/geoff.appleby/pages/50712.aspx. I've also read the post on this topic by bggraphics, but he doesn't arrive at a final result. The main problem I am having is that the layerX and layerY event properties don't work. They're supposed to return the...
|
by: wannasee |
last post by:
Hello everybody,
I am new at javascript and I would like to write a script that resizes the input fieds of an html table depending on the entered text. The input fields are placed in table cells (using <tr> and <td>) arranged like an Excel sheet.
Requirements to my script are the following:
1- When an entered text is longer than the length of the input field (there is overflow), then the script should automatically insert a linebreak...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |