Re: Confused on Syntax
- From: "Evertjan." <exjxw.hannivoort@xxxxxxxxxxxx>
- Date: 10 Mar 2007 20:39:08 GMT
=?Utf-8?B?Sm9obiBRdWlubg==?= wrote on 10 mrt 2007 in
microsoft.public.scripting.jscript:
The following two examples do not work! What am I doing wrong.
var uuuuuu = document.FORM1.txtEnrl.value;
var vvvvvv = document.FORM1.txtNoSnrs.value;
if ((vvvvvv) > (uuuuuu)){
The value of a <input type=text> is ALWAYS a string.
Putting a string in () does not make it a number.
Comparing strings compares alphanumeric.
Try:
if (+vvvvvv > +uuuuuu){
I do as little as possible with Jscript, I am a vbScript man!
Then you should already know this,
as the same compare problem,
though not the solution,
goes for [clientside] vbs.
You see, doing some javascript can improve your vbs skills.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.
- Prev by Date: Re: selectsinglenode of namespace attribute
- Next by Date: Contenteditable Div on Enter
- Previous by thread: selectsinglenode of namespace attribute
- Next by thread: Re: Confused on Syntax
- Index(es):
Relevant Pages
|