views:

194

answers:

1

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?

A: 

"Object expected" sounds like for example the Popup function wants to be called like Popup.call(somedomnode, args...). When called from an event handler, this is set to the element the handler is called on. If you just try to call it without some object as this, 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.

sth
You can find a sample copy of the page here http://www.dailynewstube.com/newlist.htm unfortunately the real site is password protected
Proximo