473,396 Members | 2,052 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.

Open popup and execute JavaScript Function

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:SEC38536A_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('http://atcit/Search.aspx', 'newWind');
newWind.SEC38536A_OSA();

Thanks in advance

Feb 1 '07 #1
4 3238
Would an "onload" work?

On Feb 1, 10:32 am, 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:SEC38536A_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('http://atcit/Search.aspx', 'newWind');
newWind.SEC38536A_OSA();

Thanks in advance

Feb 1 '07 #2
On Feb 1, 2:40 pm, supremeoppres...@gmail.com wrote:
Would an "onload" work?
I tried this:
win = window.open('http://atcit/Search.aspx', 'new');
win.onload = SEC38536A_OSA();

still no luck

Feb 1 '07 #3
On Feb 1, 3:20 pm, aljam...@gmail.com wrote:
On Feb 1, 2:40 pm, supremeoppres...@gmail.com wrote:
Would an "onload" work?

I tried this:
win = window.open('http://atcit/Search.aspx', 'new');
win.onload = SEC38536A_OSA();

still no luck
I think the source of the problem is that I am trying to access the
function from a different domain...here is a snippet I found on the
web

It is because of the cross-domain script security restriction (also
referred as the "Same Origin Policy"). A script loaded in a window (or
frame) from a distinct origin (domain name) cannot get nor set
properties of another window (or frame) or the properties of any of
its HTML objects coming from another distinct origin (domain name).
Therefore, before executing a script targeting a secondary window, the
browser in the main window will verify that the secondary window has
the same domain name.

Feb 1 '07 #4
Det vil ikke virke. Cross site scripting blokeres altid.

On 1 Feb 2007 14:11:53 -0800, al******@gmail.com wrote:
>I think the source of the problem is that I am trying to access the
function from a different domain...here is a snippet I found on the
web
Feb 2 '07 #5

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

Similar topics

3
by: Edwin Boersma | last post by:
Hi, I've just installed Netscape 7.1 for Linux and the following script refuses to open a window when I call this function: function OpenLinkWindow() { ...
2
by: venkatesh | last post by:
Hi Members, I have used the below mentioned code to open a html page in a new browser. The window size is 200 x 300. In that browser, I've given code to open another browser of the same size....
4
by: Phillip Parr | last post by:
Hello, I have a nice system where someone clicks on a picture to show the full version. This pops up in a window.open box. It works great, the only problem is that if the user clicks a second...
23
by: Markus | last post by:
Hi, i have this problem: Sometimes, i can't reproduce, if i click on an small image on the website, the popup _AND_ an other Tab in firefox open. Here are the linkcode: <div...
2
by: Matt | last post by:
I have a function that I call from an HTML page to open a pop-up window. I would like to make the height and width as parameters but I jeep getting an "Object Expected" javascript error. I am not a...
13
by: ldan | last post by:
Hi everybody, I would not consider myself an expert in javascript - but so far whatever I know, helped me reaching my goals. Recently I started to experience a lot of javascript errors related...
3
by: Dan Nash | last post by:
Hi I want to be able to click an item in a list, and a new window popup. Obviously i would use window.open in javascript within a RegisterClientScript thingy. However, i want to pass the id...
1
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
0
by: =?Utf-8?B?QWxCcnVBbg==?= | last post by:
I have a situation in which I need to check for data in either of two fields and display an alert if neither field contains data or if both fields contain data when the user clicks on a View...
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?
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
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...
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.