|
-
Mar 8th, 2004, 12:11 PM
#1
Thread Starter
New Member
{([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.
-
Mar 8th, 2004, 03:57 PM
#2
Frenzied Member
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. 
-
Mar 9th, 2004, 01:01 AM
#3
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|