if then in java

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
buck1942
Veteran Member
Posts: 31
Joined: 2016-08-04 02:38

if then in java

Post by buck1942 » 2016-09-01 04:31

I am trying to use this code in a .js HOOK file, with no success...

I am just trying to change a "1" to a "5", using java.

if ('#abc' == 1){
$j('#abc') = '5';
}

Buck

grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

Re: if then in java

Post by grimblefritz » 2016-09-01 14:38

javascript, not java - different languages and completely unrelated

Try this:

Code: Select all

$j(function(){
    if ($j('#abc).val() == 1 ) $j('#abc').val(5);
});

buck1942
Veteran Member
Posts: 31
Joined: 2016-08-04 02:38

Re: if then in java

Post by buck1942 » 2016-09-01 15:15

grimble... thanks, that works (however, I added an apostrophe after the first #abc).

Also, for letting me know that I should be looking into javascript and not java.

"Best" to the family...

Buck

grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

Re: if then in java

Post by grimblefritz » 2016-09-01 15:18

Right, sorry about the typo.

Post Reply