View Full Version : Javascript global variables acting differently on mobil browser versus computer brows

Kenneth Heeres
07-17-2012, 02:22 PM
I declare a global variable in open code in a <head> section and call a function also defined in the <head> section which sets the values. I then use the values in a <script> section in the <body> section. When access the html from Chrome on my mac it works as expected. When I access from my iPad the globals are undefined.

It turns out that an exception was being thrown in the function so the global variables were not being set.

Never mind!