473,624 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Run popup function from parent

Hi,

I have a link for an employee directory search page. The link
(http://
xxxx/Search.aspx) works fine, however, I have another link to do an
Advanced Find.
>From the search page, to do an advanced find, you click a link button
and its href is javascript:SEC3 8536A_OSA()

What I want to do is, open the search page and call this javascript
function automatically (since I am linking an advanced search)...how
is this possible?
I've tried something like this, but failed:
var newWind = window.open('ht tp://atcit/Search.aspx', 'newWind');
newWind.SEC3853 6A_OSA();
Thanks in advance

Feb 1 '07 #1
5 2146
Daz
On Feb 1, 6:28 pm, aljam...@gmail. com wrote:
Hi,

I have a link for an employee directory search page. The link
(http://
xxxx/Search.aspx) works fine, however, I have another link to do an
Advanced Find.
From the search page, to do an advanced find, you click a link button

and its href is javascript:SEC3 8536A_OSA()
I'd recommend against that. What if the user can't use JavaScript, or
doesn't want to? It's often best to use the href attribute to link to
an HTML page, and use onclick to carry out a JavaScript function and
return false to prevent the browser from following the link if
JavaScript is enabled.
>
What I want to do is, open the search page and call this javascript
function automatically (since I am linking an advanced search)...how
is this possible?
I don't think I understand you correctly. Is it possible for you to
post an example?
>
I've tried something like this, but failed:

var newWind = window.open('ht tp://atcit/Search.aspx', 'newWind');
newWind.SEC3853 6A_OSA();

Thanks in advance

Feb 1 '07 #2
Daz
On Feb 1, 6:28 pm, aljam...@gmail. com wrote:
Hi,

I have a link for an employee directory search page. The link
(http://
xxxx/Search.aspx) works fine, however, I have another link to do an
Advanced Find.
From the search page, to do an advanced find, you click a link button

and its href is javascript:SEC3 8536A_OSA()

What I want to do is, open the search page and call this javascript
function automatically (since I am linking an advanced search)...how
is this possible?

I've tried something like this, but failed:

var newWind = window.open('ht tp://atcit/Search.aspx', 'newWind');
newWind.SEC3853 6A_OSA();

Thanks in advance

Another thing that has just occurred to me, is that you might be
calling on the function before the window has fully loaded? I'm not
entirely sure if I am correct however, but you might want to look into
getting the child window to report to the parent when it's completely
loaded, before calling on the functions within it.

Feb 1 '07 #3
On Feb 1, 2:27 pm, "Daz" <cutenfu...@gma il.comwrote:
From the search page, to do an advanced find, you click a link button
and its href is javascript:SEC3 8536A_OSA()

I'd recommend against that. What if the user can't use JavaScript, or
doesn't want to? It's often best to use the href attribute to link to
an HTML page, and use onclick to carry out a JavaScript function and
return false to prevent the browser from following the link if
JavaScript is enabled.
I agree with you there, since 10-15% of users do disable JavaScript.
However, this is an intranet site, and we all use JavaScript so that
is not a worry.
What I want to do is, open the search page and call this javascript
function automatically (since I am linking an advanced search)...how
is this possible?

I don't think I understand you correctly. Is it possible for you to
post an example?
Sure...

Say I have two pages...parent. html and child.html

here is the parent:
<html>
<head>
<title>parent </title>
<script language="JavaS cript">
var win;

function popup()
{
win = window.open("ch ild.html", "test");
win.popup2();
}
</script>
</head>
<body>
<input type='button' value='parent click' onclick='popup( )'>
</body>
</html>

here is the child:
<html>
<head>
<title>child</title>
<script language="JavaS cript">
function popup2()
{
alert('true');
}
</script>
</head>
<body>
<input type='button' value='child click' onclick='popup2 ()'>
</body>
</html>
Basically I want to call open the child and call popup2 [in the child]
from the parent in one click.

Feb 1 '07 #4
On Feb 1, 2:33 pm, "Daz" <cutenfu...@gma il.comwrote:
Another thing that has just occurred to me, is that you might be
calling on the function before the window has fully loaded? I'm not
entirely sure if I am correct however, but you might want to look into
getting the child window to report to the parent when it's completely
loaded, before calling on the functions within it.- Hide quoted text -
although I don't think that this is the problem, I think you were
heading in the right direction...I am actually not able to access the
JavaScript function (in http://atcit/Search.aspx) because I am calling
it from a different domain (http://efinfonet) which induces the cross-
domain script security restriction.
Feb 1 '07 #5
Daz
On Feb 1, 9:15 pm, aljam...@gmail. com wrote:
On Feb 1, 2:33 pm, "Daz" <cutenfu...@gma il.comwrote:
Another thing that has just occurred to me, is that you might be
calling on the function before the window has fully loaded? I'm not
entirely sure if I am correct however, but you might want to look into
getting the child window to report to the parent when it's completely
loaded, before calling on the functions within it.- Hide quoted text -

although I don't think that this is the problem, I think you were
heading in the right direction...I am actually not able to access the
JavaScript function (inhttp://atcit/Search.aspx) because I am calling
it from a different domain (http://efinfonet) which induces the cross-
domain script security restriction.

Aaah. That had occured to me, but I convinced myself that you would be
trying to access it from the same domain. There are lots of tutorials
around which show you how to use remote scripting to access data from
another website using hidden frames/iframes. I am not entirely sure if
this will help you with regards to accessing the script, however.

Feb 2 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
5047
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
2
7277
by: Al Clare | last post by:
Hello, I am currently having problems with Popup windows in an application I am writing. I have a page, which opens a Popup window to a Perl Script on another server. Because of this, I cant access the Parent's DOM to execute a function on the main page from the popup. I need to execute a script in the Main window once the popup window has finished its process.
1
2839
by: Bill H | last post by:
I run a dbms application that interfaces with the web. This module creates a frames page with two frames ('main' and 'mwinfoframe'). All communication with the dbms is routed through the 'mwinfoframe' (it's sort of hidden in that it is assigned 1% (so I can view it in IE). I'm having problems with Firefox working properly while both IE 6 and Netscape v7.x work as expected. The following is additional information. A list of reports...
4
22184
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a description and a class_id (stored in the value attribute of each option). The user will then select a class from the drop-down list. What I want to do is have a control in the parent browser window which can store the class_id and the...
4
2759
by: Earl Teigrob | last post by:
I am thinking about using a popup window to edit settings that will affect parent asp.net page. The data that is changed in the popup window will be saved to the datastore that is loaded and displayed by the parent page. In order to refresh the parent page, I would like to raise an event in the popup (child) page that is subscribed to by the parent so that I can rebind the data in the parent page once the data in the child window data is...
1
11561
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at http://weblogs.asp.net/asmith/archive/2003/09/15/27684.aspx but it was far more complex then I needed. (I got lost trying to figure it all out). Therefore, here goes my simple "web dialog box with parent event handler fireing" solution. ...
15
10081
by: H00ner | last post by:
Hello All Hope you can help Been pulling my hair out about a popup problem in ASP.NET. One of the forms i wrote requires the user to select a product from a list in a popup web form. the popup has a DataGrid on it and the page.load function DataBinds as you'd expect. I have Code-Behind in C# to emit a call to a JavaScript function which
5
8033
by: midnight_use_only | last post by:
hi all, quick question, how do you submit a form to a parent window from a child popup window? i have the following and all online documentation *suggests* that it should work but it does NOT: // Parent window: <script language="JavaScript"> function popup(url, name) { window.open(url, name, "width=800,height=600,scrollbars=yes");
2
2333
by: sangram | last post by:
i need a javascript for popup window and how to pass value to that new window from old window .
0
8174
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8624
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8478
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1485
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.