Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Code not working

Avatar

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
lpianwi
Level 2

06-05-2013

Hi All,

I have written the following code, but it is not working, and I do not know why. I wrote this using javascript.

  

if(BTY.rawValue > 1 & Kasc.rawValue > 3){
    Grllac.presence="visible";
}

I am just wondering if it is not responding to the &(AND) operator I used.

Thanks

v/r

Tammy

Accepted Solutions (0)

Answers (5)

Answers (5)

Avatar

Avatar
Validate 1
Level 5
dcidev
Level 5

Likes

30 likes

Total Posts

448 posts

Correct Reply

77 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 5
dcidev
Level 5

Likes

30 likes

Total Posts

448 posts

Correct Reply

77 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
dcidev
Level 5

07-05-2013

Hmmm, well a check box only has two states on and off. Both of which can be assigned values. In your case though you have a greater than operator (>) which confuses me since I'd expect an equals to (==). Not that you can't use greater than, there's just really no point.

You might want to post your pdf so we can have a look and better unerstand what you're trying to do.

Kyle

Avatar

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
lpianwi
Level 2

07-05-2013

Good morning. I have the code placed on the exit event of the two checkboxes named BTY and Kasc. I also tried it on the click events of these checkboxes, and it still does not work.

Thanks

v/r

Tammy

Avatar

Avatar
Validate 1
Level 5
whyisthisme
Level 5

Likes

41 likes

Total Posts

324 posts

Correct Reply

59 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 5
whyisthisme
Level 5

Likes

41 likes

Total Posts

324 posts

Correct Reply

59 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
whyisthisme
Level 5

06-05-2013

The code is correct - but where did you put it?

Avatar

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
lpianwi
Level 2

06-05-2013

Thanks Kyle, I did change that, and it does not seem to get into the second part of the script after the AND &&. Here is the code.

if(BTY.rawValue > 1 && Kasc.rawValue > 3){
    Grllac.presence="visible";
}

Avatar

Avatar
Validate 1
Level 5
dcidev
Level 5

Likes

30 likes

Total Posts

448 posts

Correct Reply

77 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 5
dcidev
Level 5

Likes

30 likes

Total Posts

448 posts

Correct Reply

77 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
dcidev
Level 5

06-05-2013

You're using a bitwise AND (&) when you want to be using a logical AND (&&).

Kyle