In JS Comparison (what you are doing) is "==", while assignment (what
it's complaining about) is "=".
On 10/31/11 1:19 PM, Rick Faircloth wrote:
> Assuming the vars are correctly assigned,
> why would this statement:
>
> var atpos = fieldToValidate.val().indexOf('@');
> var dotpos = fieldToValidate.val().lastIndexOf('.');
>
> if ( atpos< 1 || dotpos< atpos + 2 || dotpos + 2 =
> fieldToValidate.val().length )
>
> give me this error for the "if" line above in firebug:
>
> 'invalid assigned left hand site'
>
> Without making any wade through all the code involved
> at this point, is there anything in the code above
> that is wrong?
>
> The syntax of the line in question came straight from
> the W3C site...
>
> Thanks for any feedback!
>
> Rick
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348370
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm