Creating DIV's with onClick (JS)?

Discussion in 'HTML & Website Design' started by brianj, Jun 18, 2010.

  1. #1
    Hi,
    i'm urgently looking for a simple [ value here ]( button ) form that creates a new <div>value</div> when submitted. Each new div box should then display the value of the form field and also have a close [x] button..


    Anyone can give me a start ?
     
    brianj, Jun 18, 2010 IP
  2. Forbidd3n

    Forbidd3n Well-Known Member

    Messages:
    262
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Is this PayPal paid help?
     
    Forbidd3n, Jun 18, 2010 IP
  3. unigogo

    unigogo Peon

    Messages:
    286
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    function CreateDIV(txt) {
    var div = document.createElement("div");
    div.style.width="30px";
    div.style.height = "30px";
    div.style.fontSize = "10px";
    div.style.marginTop="2px";
    div.style.marginRight="2px";
    div.style.backgroundColor="#ffffff";
    var txtNode = document.createTextNode(txt);
    div.appendChild(txtNode);
    return div;
    }
     
    unigogo, Jun 18, 2010 IP
  4. brianj

    brianj Member

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    thanks for help unigogo,

    i'm looking into AJAX window samples now, but i also need to have these boxes/windows created by URL, like domain.com/item1-item2-item3, but $15 would be as much i could pay for it..

    :/
     
    brianj, Jun 18, 2010 IP
  5. bvraghav

    bvraghav Member

    Messages:
    123
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    33
    #5
    i think you would better request to move this thread of yours to BST section!!
     
    bvraghav, Jun 19, 2010 IP