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

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

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
CFLSystems.com
Web Development
Reply With Quote