Closed Thread Icon

Topic awaiting preservation: Help with a script please... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8055" title="Pages that link to Topic awaiting preservation: Help with a script please... (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Help with a script please... <span class="small">(Page 1 of 1)</span>\

 
CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 01-30-2002 20:46

Can someone please tell me why this script won't work? It keeps telling me that there is an Object required at line 15 Char. 20. But I don't see the problem.

Thanks in advance.

code:
<script>
// Simple Browser Check
var ns4 = (document.layers) ? 1 : 0;
var ie4 = (document.all) ? 1 : 0;
var ns6 = (document.getElementById && !document.all) ? 1 : 0;

// Browser Window Dimensions
function winWid(){ return (ns4&#0124; &#0124;ns6) ? window.innerWidth : document.body.clientWidth; }
function winHei(){ return (ns4&#0124; &#0124;ns6) ? window.innerHeight : document.body.clientHeight; }

// Display the deminsions
var displaywitdh = winWid();
var displayheight = winHei();
document.write('Width = '+displaywitdh+' : Height = '+displayheight);
</script>



Later,
C:\


~Binary is best~

u-neek
Bipolar (III) Inmate

From: Berlin, Germany
Insane since: Jan 2001

posted posted 01-30-2002 21:33

Works fine for me(IE 5.5/W2K).

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 01-30-2002 21:35

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 01-30-2002 22:32

Which line is line 15? We can't tell without the full source code from the beginning of the HTML.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 01-30-2002 22:43

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 01-31-2002 02:22

I tried to post a response earlier but for some reason it didn't go. Anyway the problem was I was being an idiot. I had it in the head tag and it had to be in the body tag. Line 15 was the function winWid().

I got it working right now, but I have a another question. I have a page that I am testing it out on here.

It is just determining the size of the viewable horizontal space in the browser then moving the table that has the id Tag to a different height. I am changing the height of the table with the marginTop in the style sheets.

It works like a charm in IE and NN6 but does anyone have any idea of how I can do this in NN4 since Shitscape doesn't like the marginTop in CSS?

<edit>Oh I still have to get it to reload the page if the user changes the full max. Know what I mean, but you'll get the idea</edit>

Thanks for all the help.

Later,
C:\


~Binary is best~

[This message has been edited by CPrompt (edited 01-31-2002).]

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 02-01-2002 08:03

CPrompt,

I don't know of a way to use the margin to position your table in Netscape 4.x so I played around with a few ideas and I ended up just putting it in a div and reposition it onload and onresize. Take a look and see if it helps.
http://bugimus.com/gurus/cprompt/centerit.html

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 02-01-2002 13:06

Bugs, you are awesome. That works great. Hope you don't mind but I'm going to use that script.
I thought about putting the table in a div like that but still couldn't get it to work in NN4.7. I am going to study that script and see what is up.

Thanks again.



Later,
C:\


~Binary is best~

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 02-01-2002 16:05

By all means

frost
Obsessive-Compulsive (I) Inmate

From:
Insane since: Feb 2004

posted posted 02-16-2004 23:55

hi,
After a lot of searching I found this usefull script. It works fine with Mozilla Firebird using XHTML doctype but IE keeps on holding the div box on top of the window. When I remove the doctype IE does what it's supposed to do. What can I do to keep my XHTML transitional doctype and make IE center the content vertically?
thx,
Frost

« BackwardsOnwards »

Show Forum Drop Down Menu