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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.