Page 1 of 1
if then in java
Posted: 2016-09-01 04:31
by buck1942
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
Re: if then in java
Posted: 2016-09-01 14:38
by grimblefritz
javascript, not java - different languages and completely unrelated
Try this:
Code: Select all
$j(function(){
if ($j('#abc).val() == 1 ) $j('#abc').val(5);
});
Re: if then in java
Posted: 2016-09-01 15:15
by buck1942
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
Re: if then in java
Posted: 2016-09-01 15:18
by grimblefritz
Right, sorry about the typo.