SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Level 8 Chinese guy Archbob's Avatar
    Join Date
    Sep 2001
    Location
    Somewhere in this vast universe
    Posts
    3,741
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with javascript on converting a textbox into a div

    Right now I have this line of code:

    Code:
    parent.navigationIFRAME.document.getElementById("stepID").value = stepnumber;
    And this textarea inside an iframe:

    Code:
    <textarea id="stepID" cols='40' rows='5' disabled></textarea>
    So when I click on a button that has:

    Code:
    <h1  onclick=\"sendToPDF('$val')\">Step 1</h1>
    It transferred the val of $val into the textbox

    How do I convert that textbox into a div so that when I click on the link the text goes into the div?

    I've tried:

    Code:
    <div id="stepID">
    
    </div>
    But it didn't work

    Any suggestions?

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2007
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe something like
    Code:
    document.getElementById("stepID").innerHTML = stepnumber;


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •