473,322 Members | 1,806 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,322 software developers and data experts.

I want to know whether a url opened is loaded completely

I used document.readyState to check the document state, but it gave
access is denied error at that line.
is there any other way to do it??
function wackOpen(){

my_window1=window.open('http://www.yahoo.com','','left=20,top=20,width=2,height=2 ');
//my_window1.location="$send_sms[0]";

my_win_status=my_window1.document.readyState;

....
.....

}

Jul 23 '05 #1
2 2975
Ivo
<ng*****@gmail.com> wrote

my_window1=window.open('http://www.yahoo.com','','left=20,top=20,width=2,hei
ght=2'); //my_window1.location="$send_sms[0]";

my_win_status=my_window1.document.readyState;

I used document.readyState to check the document state, but it gave
access is denied error at that line.
is there any other way to do it??


Unless yahoo is your site, the answer is no. The problem is not with the
readyState but what you are trying to do here is called cross-domain
scripting and in-built security measures prevent that. Once you send the
user off to another site, there is no way you can keep track of what goes
on. And no need either.

hth
ivo
Jul 23 '05 #2
Ivo wrote:
<ng*****@gmail.com> wrote

my_window1=window.open('http://www.yahoo.com','','left=20,top=20,width=2,hei
ght=2');
//my_window1.location="$send_sms[0]";

my_win_status=my_window1.document.readyState;

I used document.readyState to check the document state, but it gave
access is denied error at that line.
is there any other way to do it??


Unless yahoo is your site, the answer is no. The problem is not with the
readyState but what you are trying to do here is called cross-domain
scripting and in-built security measures prevent that. Once you send the
user off to another site, there is no way you can keep track of what goes
on. And no need either.


of course there is (both need and way)! what if I'm writing
javascript spider (because browser is a pretty good base for a spider).
What if I want to enhance my browsing by using javascript to control the
page (instead of clicking on page etc.). There is number of legitimate
reasons to do cross-domain scripting.

That's what I'm actually trying to do right now and I find precious
little examples of how to do that (I'm new to javascript). This is just
a rant, not a question (those will come later, once I get enough info to
ask properly).

a bit of useful info for the original poster: user can allow cross
site scripting, it depends on browser so check the docs for the browser.
Not useful if you want to hijack user's browsing but useful in case user
actually wants your script to control yahoo.

(and thanks for the info, I think window.document.readyState is what
I was looking for)

erik
Jul 23 '05 #3

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

Similar topics

2
by: Frank Conte | last post by:
I'm having a problem running a simple printer friendly script written in PHP. I'm not sure whether the problem is with apache 1.3 or with the scripts. I updated apache's config file httpd.conf to...
16
by: Donjuan | last post by:
Hi all I have trouble with tracking whether my image file is loaded. i use DHTML to change my image. HERE is the code: <img name="someimage" src="1.jpg"...
4
by: Mark | last post by:
I am loading source files into several iframes, with each load happening after some user-generated event (like clicking a button). The loading works but I need to determine when the source file is...
2
by: Alan Silver | last post by:
Hello, I'm having rather a problem with user control. It is a fairly simple affair (see my other threads for more details) that shows a date and time in five drop down controls. I had private...
182
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
7
by: multicherry | last post by:
Hi, Having searched for a way to fetch a window object by name, all I came across were answers along the line of... "All you have to do is say windowObj = window.open("blah", "name");" which...
3
by: kosmodisk | last post by:
Hi, I'm having problem accessing javascript-created elements from opened window. This occurs only when I'm including another files in opened window, javascript or css. When I comment out...
22
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is...
3
jhardman
by: jhardman | last post by:
I have an old site built with frames, and I plan to leave it in frames for now. The problem is that occasionally I find links (from outside) lead me to just the content frame which means most of the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.