[thelist] Javascript - Calling Variables

Dave Stevens stem at stemofficial.co.uk
Tue Jun 25 13:14:00 CDT 2002


Evening All,

I've got a JavaScript function that determines the user's resolution (I
hope) and subtracts some values to allow for scrollbars, toolbars, etc.

this is it:

<script language="JavaScript" type="text/javascript">
    <!-- Begin
      function GetRes() {
                       var width = (screen.width - 10);
                 var height = (screen.height - 150);
                 }
    //  End -->
</script>

now, assuming that is doing what I hope it is (I'm not great with JS -
prefer PHP :D) then I now want to use the width value in the body of the
page, to set the width of a table, so how exactly would I do that?

I used a document.write line, but despite a few different attempts at it, it
doesn't work.

Could someone with an idea on how to get this work give me a shout!

Thanks,
Dave S

P.S This could be made unnecessary if anyone could tell me a way to have a
left coloumn of a table set to 195 pixels, but the right coloumn taking up
the rest of the screen width?






More information about the thelist mailing list