By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,906 Members | 1,750 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,906 IT Pros & Developers. It's quick & easy.

resend: gain HELP: checking content in opener window with frameset

P: n/a
(i hope somebody (else) will read and have an idea! Thnx)
Hi,

With a script in a popup window, I want to check if certain content is
present in a page loaded into the frame "main" of the frameset in the
opener window.

I started with something like this (what happens when the considions are
met already works):

if (
...
&& opener.window.frames['main'] ........................???
...
)

....but have no idea how to proceed..and if this beginning is ok! Assume
there is an image <img src= /photo.jpg> in that page in the 'main' frame
of the opener window.. can I check that out with this script??

Or are there other elements/text strings to check on if images wont do
it?

Most appreciated in advance.
&^%(
Thnx
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
JPL Verhey wrote:
(i hope somebody (else) will read and have an idea! Thnx)
Hi,

With a script in a popup window, I want to check if certain content is
present in a page loaded into the frame "main" of the frameset in the
opener window.

I started with something like this (what happens when the considions are
met already works):

if (
..
&& opener.window.frames['main'] ........................???
..
)

...but have no idea how to proceed..and if this beginning is ok! Assume
there is an image <img src= /photo.jpg> in that page in the 'main' frame
of the opener window.. can I check that out with this script??

Or are there other elements/text strings to check on if images wont do
it?

Most appreciated in advance.
&^%(
Thnx


I roughly understand your question but am not strong enough with js
skills to answer - perhaps others might be able to help but are not
clear in what you are asking.

Can you confirm - You have a popup window, and you want some method of
checking the contents in the popup window, using a script from the
parent window, true?

Are main and child both served from the same domain name? My guess is
yes since you've said the 'if' conditions in your example above work.

What do you want to check? Do you want to check if an image tag is
present inthe popup window, and perhaps the name of the image source?

If you can confirm the above someone else might be able to help out - by
and large, they are a friendly resourceful bunch...

randelld
Jul 23 '05 #2

P: n/a
Hi Randell, thanks for responding..I'll try make it more clear. Below:

"Randell D." <re******************************@fiprojects.moc > wrote in
message news:I7SRd.438784$6l.349433@pd7tw2no...
JPL Verhey wrote:
(i hope somebody (else) will read and have an idea! Thnx)
Hi,

With a script in a popup window, I want to check if certain content
is
present in a page loaded into the frame "main" of the frameset in the
opener window.

I started with something like this (what happens when the considions
are
met already works):

if (
..
&& opener.window.frames['main'] ........................???
..
)

...but have no idea how to proceed..and if this beginning is ok!
Assume
there is an image <img src= /photo.jpg> in that page in the 'main'
frame
of the opener window.. can I check that out with this script??

Or are there other elements/text strings to check on if images wont
do
it?

Most appreciated in advance.
&^%(
Thnx
I roughly understand your question but am not strong enough with js
skills to answer - perhaps others might be able to help but are not
clear in what you are asking.

Can you confirm - You have a popup window, and you want some method of
checking the contents in the popup window, using a script from the
parent window, true?


No.. First of all, the script is in the pop-up window. The pop-up page
is also refreshing itself with another script in the page, every second.
Evertime is refreshes, it checks with an if-statement the content in the
opener window (the window from which the pop-up was opened with
window.open).

At the moment it works, but only if the document in the opener window is
one single page without framesets. (ultimately the script much check in
a frameset page that is loaded in the opener..with .ASP generated
content) At the moment (and which works, as said) the if-statement is
returned true if a page called log3.htm is loaded in the opnener window.
This if-statement goes like this:

if
(
parent.opener
&& !parent.opener.closed
&& parent.opener.location.replace
&& parent.opener.location.href.match(/log3\.htm$/)
)

Ultimately it should not check on log3.htm (which is just my test
version here), but on an asp-generated content page that is loaded in a
frame "main" of the frameset of a page loaded in the opnener window at
one point. (So what happens basically, is that the user is clicking
links in the opnener window, while the refreshing pop-up keeps checking
if you already are "there" (when the if-statement returns true). What
happens after the if-statement returns true,,already works.. only this
little damn thingie!! ;)

I hope this made things more clear.. thanks to anyone with some ideas!

&%&^%
JPL



Are main and child both served from the same domain name? My guess is
yes since you've said the 'if' conditions in your example above work.

What do you want to check? Do you want to check if an image tag is
present inthe popup window, and perhaps the name of the image source?

If you can confirm the above someone else might be able to help out -
by and large, they are a friendly resourceful bunch...

randelld

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.