Jump to content

noob i know, but having greather than issues


radar

Recommended Posts


if(document.getElementById('order_amount').value >= document.getElementById('cpc').value) {
document.getElementById('order_amount').value = document.getElementById('cpc').value;
}

 

this works, up until 99 as soon as you type 100 into the order ammount, it doesn't recognize 100 being greater than or equal to 30

 

any idea's as to why?

 

the 2 form fields for this look like:

 

<input id="order_amount" maxlength="3" name="order_amount" size="3" type="text" value="1" onchange="calPrice('{$data.sale_price}');" />
<input name="cpc" type="hidden" id="cpc" value="{$data.qty_pc}">

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.