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