Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Make Bit field control value of float field

16 views
Skip to first unread message

Jacob Mondrup - Vivant

unread,
Nov 19, 2009, 3:08:12 PM11/19/09
to
Hi.

I've made bit field with the default options of yes and no: new_Q1
Then i've made a field to collect a amount of points, incase the bit is set
to yes: new_Q1p.

If i select the format of the bit value to "list" my script works fine. If I
select "check box", it does not work.

Can any one help me modyfi the script to work with the check box?

Thanks

Regards, Jacob Mondrup


This is the script I use:
______________________________________________________________________________
var point = 0;
var get_status = parseInt(crmForm.all.new_q1.DataValue);
switch (get_status)
{
//No
case 0:
point = 0;
break;

// Yes
case 1:
point = 10;
break;
}
crmForm.all.new_q1p.DataValue = point;
_______________________________________________________________________________

Ian Oldbury

unread,
Nov 19, 2009, 5:42:04 PM11/19/09
to
if you check the value of get_status, i'd suspect that it doesn't parse.

try...
var get_status = crmForm.all.new_cpdtcs.DataValue;
if ( get_status == true )
point = 10;
else
point = 0;

crmForm.all.new_q1p.DataValue = point;

> .
>

dave

unread,
Nov 20, 2009, 1:34:03 PM11/20/09
to
On 19 Lis, 23:42, Ian Oldbury <IanOldb...@discussions.microsoft.com>
wrote:

Jacob, you should be aware that onchage code attached to checkbox will
be fired when you change checkbox value and click somewhere else. When
you use list or radiobuttons code is fired immediately after value
change.


Regards,
Dawid Kolodziejczyk
http://team4crm.com

GI Joe

unread,
Dec 1, 2009, 4:25:01 AM12/1/09
to
Hope this helps you.

var point = 0;
if(crmForm.all.new_q1.checked)
{
//true
point = 10;
}
else
{
//false
point = 0;
}

NOTE : As said by dave the on change script will be fired only when the
focus comes out of the check box.

0 new messages