How do detect "Action Cancelled" page with out polling.

S

sid

Can someone tell me how to detect "Action Cancelled" page with out
polling.

I have a frame set and I want to make sure the other frame is
displaying what it is supposed to without polling. For some reason
the page does not file OnError or OnLoad events.

Any help is appreciated.

Thanks

Sid.
 
E

Erwin Moller

sid said:
Can someone tell me how to detect "Action Cancelled" page with out
polling.

I have a frame set and I want to make sure the other frame is
displaying what it is supposed to without polling. For some reason
the page does not file OnError or OnLoad events.

Hi. file = fire?

page A = some page that sometimes fails.
pageB = your page that wants to know if pageA has loaded/displaying right.

If pageA has an onLoad event that mentions it loadedness to page B, you are
fine.
If that, as you claim, does not work, I can think of the following:
- JavaScript is disabled
- You made a codingmistake
- The domain from which pageA and pageB are served are not the same.

you should do something like this from page A:
<body onLoad="parent.frames.frameBnamehere.pageALoaded();">

And of course in page B

function pageALoaded(){
alert ("Page B speaking: Page A loaded.");
}

Regards,
Erwin Moller
 
S

sid

Hi. file = fire?

page A = some page that sometimes fails.
pageB = your page that wants to know if pageA has loaded/displaying right.

If pageA has an onLoad event that mentions it loadedness to page B, you are
fine.
If that, as you claim, does not work, I can think of the following:
- JavaScript is disabled
- You made a codingmistake
- The domain from which pageA and pageB are served are not the same.

you should do something like this from page A:
<body onLoad="parent.frames.frameBnamehere.pageALoaded();">

And of course in page B

function pageALoaded(){
alert ("Page B speaking: Page A loaded.");

}

Regards,
Erwin Moller






- Show quoted text -

Thanks Erwin,

I believe I am narrowing the problem. Yes I can read page B from Page
A as long as the page loads correctly.
But If I receive an "Action Cancelled" or "Page can not be displayed"
I get an "access denied" when I try to read the page contents.

Also, my intention was to set Location.href = "About:Blank" and then
write my own page but I seem to get "access denied" there as well and
both pages are from the same machine.

All this seemed to work correctly when I was testing from the same
machine. (workstation configured with IIS)
But then when I testing that page from a second machine I can't read
the page.

Thanks

Sid.
 
E

Erwin Moller

sid said:
Thanks Erwin,

I believe I am narrowing the problem. Yes I can read page B from Page
A as long as the page loads correctly.
But If I receive an "Action Cancelled" or "Page can not be displayed"
I get an "access denied" when I try to read the page contents.

Don't try to access pageA from pageB.
Why not?
Excactly as you described: pageA is maybe not loaded or has some error.

Or at least don't try it untill pageA told pageB it has loaded, via the
abovementioned onLoad-event.

Also, my intention was to set Location.href = "About:Blank" and then
write my own page but I seem to get "access denied" there as well and
both pages are from the same machine.

All this seemed to work correctly when I was testing from the same
machine. (workstation configured with IIS)
But then when I testing that page from a second machine I can't read
the page.

Yes. That makes sense.
I *think* that About:Blank is considered 'localhost', but I am not 100%
sure.
That means that on your develmachine, you can set it because it is both on
localhost, but once you move to a different machine, pageA and PageB are in
different domain, and then JavaScript security kicks in.

I am not 100% sure that About:Blank is considered 'localhost'.
Maybe somebody else can help you with or you can find a trick to discover
this yourself.

Good luck.

Regards,
Erwin Moller
 
S

sid

Don't try to access pageA from pageB.
Why not?
Excactly as you described: pageA is maybe not loaded or has some error.

Or at least don't try it untill pageA told pageB it has loaded, via the
abovementioned onLoad-event.





Yes. That makes sense.
I *think* that About:Blank is considered 'localhost', but I am not 100%
sure.
That means that on your develmachine, you can set it because it is both on
localhost, but once you move to a different machine, pageA and PageB are in
different domain, and then JavaScript security kicks in.

I am not 100% sure that About:Blank is considered 'localhost'.
Maybe somebody else can help you with or you can find a trick to discover
this yourself.

Good luck.

Regards,
Erwin Moller







- Show quoted text -- Hide quoted text -

- Show quoted text -

More Progress !

I found an error in the script above all routines that for some reason
blowing up the remote browsers.
Don't know why it worked locally.
The script was call a Sub that I had commented out serveral days ago.
Now works on the second PC

Now I tested it on a brandnew Dell out of the box and now I found that
everytime it set main.location.href = "about:blank" it opened up a new
browser. Why How would I test for that ?

Sid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top