Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Open popup and execute JavaScript Function

Reply
Thread Tools

Open popup and execute JavaScript Function

 
 
aljamala@gmail.com
Guest
Posts: n/a
 
      02-01-2007
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

 
Reply With Quote
 
 
 
 
supremeoppressor@gmail.com
Guest
Posts: n/a
 
      02-01-2007
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



 
Reply With Quote
 
 
 
 
aljamala@gmail.com
Guest
Posts: n/a
 
      02-01-2007
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

 
Reply With Quote
 
aljamala@gmail.com
Guest
Posts: n/a
 
      02-01-2007
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET JavaScript Popup, No Popup Using Back Button dapkniht ASP .Net 1 03-08-2006 08:49 AM
Page -> Popup -> New Page (close popup, leave old page open) julie.siebel@gmail.com Javascript 2 01-18-2006 12:57 AM
How to open a popup when popup blocker is turned on Ashish Javascript 2 10-31-2004 07:00 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM
Javascript function works but C# function doesn't execute Jim Hammond ASP .Net 2 11-14-2003 08:43 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57