I have a page that loads a bunch of scripts to prepopulate dropdowns and has scripts within the html onclick events and etc.
After the page loads and I open the page in the script console I can’t do anything. everything is null and functions non-existent.
For example there is an onClick function onclick="Popup('Seattle');".
If I try to invoke that from the script console I get Object Expected error like it doesn’t even exist. But if I click the button the method fires right up. I can’t modify this code so it’s important that I get this functions going.
While I’m stepping through the code and have the script paused I have access to everything but as soon as it’s finished it’s back to nothing at all.
Anyone know what’s going on and is there a way to invoke these functions?
“Object expected” sounds like for example the
Popupfunction wants to be called likePopup.call(somedomnode, args...). When called from an event handler,thisis set to the element the handler is called on. If you just try to call it without some object asthis, it might complain.Otherwise probably the functions you want to call are not in scope at top-level. You don’t really tell us how these functions are defined or how the event handlers get set up, so it’s hard to say more where the problem might be.