Johnson,

This is a javascript detail, but if your ssaved=false, both alerts
should return false. However, if ssaved="false", the boolean will return
true. When you add the quotations, false si a string, without it is the
boolean value. If you need it as a string, make the
bs.alert(Boolean(ssaved=="true")) will return false when ssaved is not
the string "true".

Seth

-----Original Message-----
From: johnson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 5:06 AM
To: users@cocoon.apache.org
Subject: help please

Hi!
I use 2.1.8 , and want to know the value in a repeater field.

var ssaved = logList.getRow(i).getChild("saved").getValue();
bs.alert(ssaved); --false
bs.alert(Boolean(ssaved)); --true

the first one show false(it's correct), and second show true, why.

the typeof ssave is object.

Best Regards

johnson


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to