How do I find Prod Title Id
Posted: Wed Aug 01, 2012 10:35 pm
here is my Code I want Create a function which take element id dynamically
function otherCatChargs(qty,prodTitle){
var quantity=document.getElementById(qty).value;
var proTitle=document.getElementById(prodTitle).innerHTML;
var service_charges=175;
var concert_tckt_service=150;
and here is code where i calling it
<td class="product-title" id="product-title<?php echo $counter;?>"><?php echo $d[$i];?></td><input type="hidden" name="p_name<?php echo $counter;?>" id="prd_name" value="<?php echo $d[$i];?>" />
<input type="hidden" name="item_id<?php echo $counter;?>" value="<?php echo $row['item_id'];?>"/>
<td class="num-pallets"><input type="text" class="num-pallets-input" name="product_qty<?php echo $counter; ?>" id="turface-mvp-num-pallets<?php echo $counter; ?>" onkeyup="otherCatChargs(this.id)"/></td>
How I find It of product-title class ..
function otherCatChargs(qty,prodTitle){
var quantity=document.getElementById(qty).value;
var proTitle=document.getElementById(prodTitle).innerHTML;
var service_charges=175;
var concert_tckt_service=150;
and here is code where i calling it
<td class="product-title" id="product-title<?php echo $counter;?>"><?php echo $d[$i];?></td><input type="hidden" name="p_name<?php echo $counter;?>" id="prd_name" value="<?php echo $d[$i];?>" />
<input type="hidden" name="item_id<?php echo $counter;?>" value="<?php echo $row['item_id'];?>"/>
<td class="num-pallets"><input type="text" class="num-pallets-input" name="product_qty<?php echo $counter; ?>" id="turface-mvp-num-pallets<?php echo $counter; ?>" onkeyup="otherCatChargs(this.id)"/></td>
How I find It of product-title class ..