WEB What am I doing wrong?!

Discussion in 'OT Technology' started by pullmancrew, Jun 9, 2009.

  1. pullmancrew

    pullmancrew New Member

    Joined:
    Jun 9, 2007
    Messages:
    323
    Likes Received:
    0
    So I have this in my HTML body




    <div id="currentTicket"><?php print($result['tabNum']); ?></div>

    (which it does print the correct value)



    but then in the javascript I have


    var ticketNum = document.getElementById("currentTicket").value;

    but it always comes up as undefined when I try to use that variable even in alert().

    Any idears? thanks!
     
  2. pullmancrew

    pullmancrew New Member

    Joined:
    Jun 9, 2007
    Messages:
    323
    Likes Received:
    0
    nevermind it wanted innerHTML not .value....


    fail.
     

Share This Page