How to create multiple DIVs based on user entered values HEIGHT and WIDTH

Discussion in 'JavaScript' started by ash29, Nov 24, 2012.

  1. #1
    Hie, how do I create multiple div's on button click on user entered values of HEIGHT and WIDTH
    for example, on choosing a drop down list item and then clicking on a button a div should get created and then on next drop down list item on select and then on button click another div should get created besides it.
    Can the div be created based on user entered values of width and height of the div?
    Please Help!
    thanks!
     
    ash29, Nov 24, 2012 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
  3. ash29

    ash29 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the reply
    but I have tried it out, the problem is that the image dissapears on button click.
    I have especially posted here as a new topic as I am facing a serious challenge in this project!
    kindly help
    thanks!
     
    ash29, Nov 24, 2012 IP
  4. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #4
    Either the code is written so the button toggles the div (visible/not visible), or the code is written so the button adds new divs. It can't do both.
     
    Rukbat, Nov 25, 2012 IP