Web Analytics Made Easy -
StatCounter placing link into textbox - CodingForum

Announcement

Collapse
No announcement yet.

placing link into textbox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • placing link into textbox

    Hello, I'm wondering if you can help witha problem I have.
    I am trying to make something where you click on the ID and it is placed in a box:
    <input name='id' id='id' class='textbox' type='text' value='' size='30'>
    ^^ thats the box which i want the text placed in. I want it so I can click on something and it will auto appear in a box like that, any help?

  • #2
    Code:
    <span onClick="document.myform.target.value = this.nodeValue";>content</span>
    
    <form id="myform" name="myform"
    <input name='target' id='target' class='textbox' type='text' value='' size='30'>
    </form>

    Comment


    • #3
      So if I post it as:
      <span onClick='document.myform.target.value = this.nodeValue';>$fo->id</span>
      <form id='myform' name='myform'>
      <input name='id' id='id' class='textbox' type='text' value='' size='30'></form>

      it should work?

      Comment


      • #4
        in theory it should, but i didn't test it. give it a shot and let me know.

        Comment


        • #5
          Nope it doesn't.. When I hover over the id it isn't a link, just how it is before, an I.

          Comment


          • #6
            does it replicate the text? or are you just saying it fails because it isn't actually a link. because jesus man.. change the span to a anchor tag. the onclick will still work.

            Comment


            • #7
              it just doesn't work, I click on the id and it does nothing.

              Comment


              • #8
                change this.nodeValue to this.innerHTML

                i just tested it and it works

                Comment


                • #9
                  thanks

                  Comment

                  Working...
                  X