By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,934 Members | 1,441 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,934 IT Pros & Developers. It's quick & easy.

Function Exists -- Parent Window

P: n/a
To validate that a function exists on the page, one must simply use the
syntax:
if ( window.funcName ) //...

However, the same syntax does not seem to work when attempting to validate
that a function exists on a parent window of a popup.

if ( window.opener.funcName ) //...

Is there a syntax that works for this? I've tried everything I can think
of. TIA~ PJ
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"crazy_nelly" <yo*@wish.com> writes:
However, the same syntax does not seem to work when attempting to validate
that a function exists on a parent window of a popup.

if ( window.opener.funcName ) //...
It should. Try again! :)
Seriously, you fail to say how you test it and how it fails. Does it
give false positives or false negatives?
Is there a syntax that works for this? I've tried everything I can think
of.


This should work, if the code is correct. Show us the code (just a link
to a page that shows the problem would be fine), and we'll see if we can
find the bug.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com Art D'HTML:
<URL:http://www.infimum.dk/HTML/randomArtSplit.html> 'Faith without
judgement merely degrades the spirit divine.'
Jul 20 '05 #2

P: n/a
Sorry, the page is not published yet and the site is not publically
accessible.

I found my issue...the function was inside the closing bracket of the
function b4 it. doh!

Thanks~

"Lasse Reichstein Nielsen" <lr*@hotpop.com> wrote in message
news:he**********@hotpop.com...
"crazy_nelly" <yo*@wish.com> writes:
However, the same syntax does not seem to work when attempting to validate that a function exists on a parent window of a popup.

if ( window.opener.funcName ) //...


It should. Try again! :)
Seriously, you fail to say how you test it and how it fails. Does it
give false positives or false negatives?
Is there a syntax that works for this? I've tried everything I can think of.


This should work, if the code is correct. Show us the code (just a link
to a page that shows the problem would be fine), and we'll see if we can
find the bug.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com Art D'HTML:
<URL:http://www.infimum.dk/HTML/randomArtSplit.html> 'Faith without
judgement merely degrades the spirit divine.'

Jul 20 '05 #3

P: n/a
> Sorry, the page is not published yet and the site is not publically
accessible.

I found my issue...the function was inside the closing bracket of the
function b4 it. doh!


You might want to use jslint to help find things like that.
http://www.crockford.com/javascript/lint.html

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.