Javascript objects cant see each other? :: google chrome extension?

I suspect the error lies somewhere else - these are my examples: mark@localhost:~/ccsite$ cat cat. Js var stats = { myFunc : function() { alert('wtf'); } } mark@localhost:~/ccsite$ cat hat. Htm Htm in either FF, IE6 or Chrome produces the alert, 'wtf'.

As written you'd get $ is undefined, since it's not including jQuery of course, so I added that So, your problems likely are elsewhere. I assume this is a simplified example - what else is going on in your page?

I suspect the error lies somewhere else - these are my examples: mark@localhost:~/ccsite$ cat cat. Js var stats = { myFunc : function() { alert('wtf'); } } mark@localhost:~/ccsite$ cat hat. Htm Viewing hat.

Htm in either FF, IE6 or Chrome produces the alert, 'wtf'. As written you'd get $ is undefined, since it's not including jQuery of course, so I added that. So, your problems likely are elsewhere.

I assume this is a simplified example - what else is going on in your page?

I have updated the code. – Hailwood Sep 29 '10 at 10:49.

I have suspicions that it's because you include js/statsapi. Js script into both your popup and background page, so it gets confused which stats you are referring to as you have 2 of them in the popup - one included through script tag and another one loaded from background page after you call chrome.extension. GetBackgroundPage().

Nope, I need to include it separately in the background page as all calls to that are independent of the popup page. – Hailwood Sep 29 '10 at 21:54.

This is because there is some syntax error in your code. I had same problem. I opened my background.

Html page in fire fox with fire-bug plug-in enabled. Fire-bug console should me the error, I fixed and it is working now.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions