Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript [Solved] Trouble Using Variable in GetElementById Reply To: [Solved] Trouble Using Variable in GetElementById

#246024
ruby76
Participant

Whoops – I deleted that reference to loc (thanks!) but sadly that didn’t prevent the problem. I cleaned up a couple of other minor things that were showing up in the console, but now it’s just completely clean, at least in Chrome. I updated the pen link from above.

Neither passing the variable or the actual div value (“ehs”) produce any errors – the only difference is that the variable version gives me a blank popup box, and the “ehs” plugs in the content. But when I add that “.value” at the end, I do get a console error that it can’t read the property value of null.

Does that point to any other errors that you can think of?

Thanks so much for looking into this with me.