steveclondon Posted October 6, 2008 Share Posted October 6, 2008 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'); } Quote Link to comment Share on other sites More sharing options...
Flames Posted October 6, 2008 Share Posted October 6, 2008 try adding document.theForm.bid.value and document. for lowest bid as well Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.