View Single Post
Old 02-07-2020, 11:37 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline

Join Date: Apr 2007
Posts: 14,096

Default Re: Having trouble modifying a smarty variable inside javascript

Sorry I wasn't paying much attention.
Math.random will never return 1. It returns random number between 0 and 1. It may return 0 but 1 is not included. So your if statement will always fall into the else clause
Steve Stoyanov
Web Development
Reply With Quote