1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can someone help me with a simple thing in Javascript?

Discussion in 'BlackHat Lounge' started by ThePayRoll, Apr 18, 2011.

  1. ThePayRoll

    ThePayRoll BANNED BANNED

    Joined:
    Dec 1, 2010
    Messages:
    230
    Likes Received:
    86
    Can someone help me out with a little bit of javascript?

    All I want to do is generate a random number between a high and low integer ex: 140 and 200. And how would I make it "usable" for example - have a random number between the high and low be generated then use that number for the width of an IFrame then generate another number and use it for the height of the IFrame?
    Like so -
    Code:
    <iframe src="/testpg.html" width="RANDOMwidth" height="RANDOMheight"></iframe>
    If this is of any help, I've found this:
    Code:
    http://css-tricks.com/generate-a-random-number/
    I know how to edit it and all, but I can't figure out how to make it generate a random number on-load. I tried editing the vars highnumber and lownumber, but it keep's erroring out.
     
    Last edited: Apr 18, 2011
  2. ThePayRoll

    ThePayRoll BANNED BANNED

    Joined:
    Dec 1, 2010
    Messages:
    230
    Likes Received:
    86
    Anyone?