Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    onchange events in innerHTML

    I have a table with x & y rows.

    The innerhtml for a row is a unique value which is updated onchange:

    <td></td><input value="what the f ever" id="10" style='width:125px;text-align:center' onchange='updateinput("table",this.value,1,0)' /></td>

    function updateinput(tablez,ish,xcor,ycor)
    {
    var insert_text = "<td></td><input value=" + "\"" + ish + "\" id=" + "\"" + xcor + ycor + "\" style='width:125px;text-align:center' onchange='updateinput(" + tablez + ",this.value," + xcor + "," + ycor + ")' /></td>";

    var insert_html = document.getElementById(tablez).rows[xcor].cells[ycor];
    insert_html.innerHTML = insert_text;
    }

    Problem is that the onchange event only gets triggered once. Even when I manually change the value of the input box. Is there something I'm missing so that I can make more than one onchange call?

  • #2
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    got it! nevermind


  •  

    Posting Permissions

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