Js that would fill a textbox with info after a button click?

Discussion in 'JavaScript' started by x0x, Jul 10, 2009.

  1. #1
    Let's say there are three buttons and one big text box.

    If I click the first button, some certain info is copied in the text box etc. Is that possible?
     
    x0x, Jul 10, 2009 IP
  2. JavaScriptBank.com

    JavaScriptBank.com Peon

    Messages:
    141
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    JavaScriptBank.com, Jul 10, 2009 IP
  3. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Thank you.
     
    x0x, Jul 11, 2009 IP
  4. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #4
    What do you think about this?

    Let's say from your example, I replace the 'info' with a php variable that is for example
    $lala = "info";

    it works that way, but if it contains line breaks, it doesn't:

    $lala = "info
    more info";

    why is that?
     
    x0x, Jul 11, 2009 IP