473,385 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Function Exists -- Parent Window

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
3 9420
"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
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
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Filiz Duman | last post by:
Is it possible to call a javascript function based in the parent window from the child window ? I do open a pop up window from the parent window with: newwindow = window.open (...) and assign...
2
by: Reply Via Newsgroup | last post by:
Folks, I was sure this could be done - or at least sure I had seen reference to it at some point or other - but now, after having gone for a cup of tea, am begining to doubt my original belief....
8
by: Falc2199 | last post by:
Hi, Does anyone know how to make this work? var sectionId = 5; repeat_section_sectionId(); function repeat_section_5(){ alert("firing"); }
28
by: Stefan Mueller | last post by:
I can display the value of the following input box with alert(parent.MyFrame.document.MyForm.MyInput.value); But if the frame, the form or the input box doesn't exist I get of course an error...
24
by: John Gabriel | last post by:
CreateDialogIndirect() fires my Radio button click function without the radio button having being clicked. I am using VC++ 2003.NET. I believe this is yet another Microsoft bug. Have checked dialog...
18
by: Chris Ianson | last post by:
Hi geniuses (or is that genii, or genies) The challenge is as above really. I have a page with an iframe in it, and need to call a JS function in the *parent* page, *from* inside the iframe. ...
3
by: jack21 | last post by:
I have a main window containing a list of items along with some buttons. If the user clicks the 'View' button, I open a child window containing the details of the item along with 'Approve' and...
3
by: skwebmedia | last post by:
<script language="javascript" type="text/javascript" > function showflash(i) { if (i==1) window.parent.document.getElementById('V1').movie = "flash/Live-Media-sks.swf"; else if (i==2)...
2
by: ad08 | last post by:
Is this possible? I am trying to access function from grand parent window (the main window) in my child popup window but the parent window is closed in this case. a.jsp --> grand parent window...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.