javascript - Uncaught TypeError: object is not a function calling a function on change form input -


i error on this:

this function inside jscript.js source in section of index.php

function upd(ctd, id, pr){           //$('#sub'+ id).val() = ctd * pr;     document.getelementbyid('sub'+ id).value = ctd * pr; } 

i have form built dinamically. sample of 1 of inputs, id=4

this html inside div loaded ajax

150 times  <input name="ct4" id="c4" type="text" value="10" onchange="upd(this.value,4,150);" /> =<span id="sub4">1500</span> 

http://jsfiddle.net/xcytc/247/

span element doesnot have value attribute, change to:

document.getelementbyid('sub'+ id).innerhtml = ctd * pr; 

see: updated fiddle


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -