473,383 Members | 1,984 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,383 software developers and data experts.

Accessing functions between windows

I would like to know how to access a function in a window from a created window. Here is a sample.

Original Window:
function OpenJobPage(varid)
{
var newWin = window.open('subwin.aspx?id=' + varid, 'popNewWindow' + jobid, 'toolbar=0, ' + 'height=500, width=850, resizable=1, scrollbars=1');

if(newWin.opener == null)
newWin.opener = window;
newWin.focus();
return false;
}

function RefreshContents()
{
// ... function
}

// Function in created window
function RefreshParent()
{
try
{
if(window.opener != null)
{
alert("Attempting Refresh");
parent.window.opener.RefreshList();
}
}
catch(ex)
{
alert("Function Missing:\n\n" + ex);
}

}

I get the refresh alert, it just doesn't run the script from the first window.

Thanks,
Leo
Mar 8 '07 #1
3 1225
iam_clint
1,208 Expert 1GB
i believe you need to take parent. off
window.opener should call it.
Mar 8 '07 #2
I tried it both ways and it still doesn't open an alert for the dialog.

Thanks,
Leo
Mar 8 '07 #3
I narrowed down the problem. Function is calling, but I am trying to do an AJAX call from the page, and I don't think I can do that from another page. The function needs to call the server to update a table in the originating page. I'll see what I can come up with.

Leo
Mar 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dabeule | last post by:
Hello, I have to read/write in the UART to transfer bytes through the serial port. I use Visual C++ 6 and Win2000. When I used Win98, the problem was easy : the functions _inp and _outp (or the...
3
by: Taurkon | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** I need to search and then open a file in a folder that is protected using NT2000 security. Is there a file open command that allows...
4
by: Thomas Brendgen | last post by:
Hello, in my Programm I get the path of a directory (e.g. c:\windows\temp or \root ). Now I want to now which files are in this directory. I need the filenames of them and if it's possible the...
4
by: amorphous999 | last post by:
I will be creating a small web site using php/apache/SQL Server running on a Win2000 server. It sounds as if there a number of alternatives for accessing SQL Server: mssql* functions, ADOdb...
6
by: harry | last post by:
Hi ppl I have a question about memory layout of a class. Consider the code below: class Base1 { virtual void f() { cout << "Base1::f" << endl; } virtual void g() { cout << "Base1::g" <<...
4
by: JakeP | last post by:
how should you access the dos os from a c program whuch as djgpp? need to write an app that would for example get a list of all *.h files and store them in a linked list so the names need to be...
2
by: Kumar | last post by:
Hi Folks, I have a question regarding my windows c# application. This application just reads MS Excel file and puts the data in to sql server database. In that excel file ,it has one named cell...
0
by: Jason Hansen | last post by:
I have a COM object that I need to access from a C# aspx page. When I run the page on my local system (XP Pro), I have no problems with getting the data I need from the control. When I install...
4
by: Joseph Paterson | last post by:
Hi all, I'm having some trouble with the following code (simplified to show the problem) class Counter { protected: int m_counter; }
9
by: fgh.vbn.rty | last post by:
Say I have a base class B and four derived classes d1, d2, d3, d4. I have three functions fx, fy, fz such that: fx should only be called by d1, d2 fy should only be called by d2, d3 fz should...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
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: 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.