Results 1 to 3 of 3

Thread: {([RESOLVED])} javascript variables {([RESOLVED])}

  1. #1

    Thread Starter
    New Member Omega Deus 82's Avatar
    Join Date
    Mar 2004
    Posts
    2

    {([RESOLVED])} javascript variables {([RESOLVED])}

    I am trying to set up a script that will use javascript to set the width of a table to a random number generated, and i haven't the first clue about javascript so i'm lost. Does anyone know how i could accomplish this, or if it's even possible?
    Last edited by Omega Deus 82; Mar 9th, 2004 at 01:03 AM.

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    OK, this is totally untested codeL
    Code:
    <html>
    <body>
    <script type="text/javascript">
    min = 200
    max = 500
    rnd = (math.round()*(max-min))+max
    document.write("<table width='"+rnd+"'>")
    document.write("<td>")
    document.write("<tr>")
    document.write("weeee")
    document.write("</td>")
    document.write("</tr>")
    document.write("</table>")
    </script>
    </body>
    </html>
    Have I helped you? Please Rate my posts.

  3. #3

    Thread Starter
    New Member Omega Deus 82's Avatar
    Join Date
    Mar 2004
    Posts
    2

    thank

    What i had used originally was pretty similar to that, but i had some slight errors in it that were not allowing it to work...seeing how you did yours, showed me the error i had in mine, which allowed me to correct my problem and it works now. Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width