#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    1
    Rep Power
    0

    setting up frames w/ javascript


    Hey,

    I'm having a bit of a problem trying to setup a frameset w/ javascript.

    What im trying to do is detect the screen size then change the size of the frames manually to best fit that that resolution.
    ( 25%, 100%, 5% doesnt cut it on all resolutions)

    It works here on my system, but when I upload it -- no good.

    I could redirect them to a different frameset, but this would be easier...

    thanks in advance

    ///////// code

    <html>
    <head>
    <title>test</title>
    </head>

    <script language="JavaScript">

    document.write('<frameset rows="25%, 100%,5%" cols="*" frameborder="NO"
    border="0" framespacing="0">')
    document.write('<frame name="topFrame" scrolling="NO" noresize
    src="header.htm" >')
    document.write('<frame name="mainFrame" src="main.htm">')
    document.write('<frame name="bottomFrame" scrolling="NO" noresize
    src="footer.htm">')
    document.write('</frameset>')

    </script>
    <body bgcolor="#FFFFFF" text="#000000">
    </body>
    </html>
  2. #2
  3. No Profile Picture
    Beelzebub
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    The nether regions...ok, San Diego
    Posts
    164
    Rep Power
    14
    Try...
    <html>
    <head>
    <title>test</title>
    </head>

    <script language="JavaScript">

    document.write('<frameset rows="25%,*,5%" frameborder="NO" border="0" framespacing="0">');
    document.write('<frame name="topFrame" scrolling="NO" noresize src="header.htm">');
    document.write('<frame name="mainFrame" src="main.htm">');
    document.write('<frame name="bottomFrame" scrolling="NO" noresize src="footer.htm">');
    document.write('</frameset>');

    </script>
    </html>

    don't put any body tags in a frameset, and don't have rows that add up to more than 100%

IMN logo majestic logo threadwatch logo seochat tools logo