473,396 Members | 1,599 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,396 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 9421
"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...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.