Jump to content

check if figuare a is lower than b


steveclondon

Recommended Posts

Hi

 

I have to values in a form and want to check if one is lower than the other. see below my details, please do not worry about theForm bit that will get the element by Id further up.

 

I have alerted both values and they are fine so as an example I sent theBid at 100 and then theLowestBid at 50 and it does not work, if I swap them around and have a < instead it always displays the same results no matter what the values are? any ideas because its not meant to work like this?

 

var theBid=theForm.bid.value;

var theLowestBid=theForm.lowestBid.value;

if (theBid>theLowestBid)

{

alert('the bid is not above the lowest bid');

 

}

Link to comment
https://forums.phpfreaks.com/topic/127209-check-if-figuare-a-is-lower-than-b/
Share on other sites

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.