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

ASP "no right" error

P: n/a
I have a statement in a asp,like follows£º
var str=window.top.main.document.all.contenttext.value ;

I use IIS5.0 to deploy this asp,then I visit this asp like follows:
http://localhost/test/default.asp

I found I can get this page,then I use my computer's IP address,
http://192.168.0.3/test/default.asp

I got errors! It said "no right"£¬then I erase this statement,then I visit
this asp again,this time I don't get error.But I need this statement "var
str=window.top.main.document.all.contenttext.value "
How to correct my code to run it?

Thanks!
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Edward King wrote:
I have a statement in a asp,like follows£º
var str=window.top.main.document.all.contenttext.value ;

I use IIS5.0 to deploy this asp,then I visit this asp like follows:
http://localhost/test/default.asp

I found I can get this page,then I use my computer's IP address,
http://192.168.0.3/test/default.asp

I got errors! It said "no right"£¬then I erase this statement,then I
visit this asp again,this time I don't get error.But I need this
statement "var str=window.top.main.document.all.contenttext.value "
How to correct my code to run it?

Thanks!


This is not an asp.net problem, but client-side javascript/html.

Apparently you are using frames, and from the frameset that is
loaded from "192.168.0.3" you are referring to frames with
a different server address ("localhost" ?). *you* know this is the
same machine, but the browser doesn't! So you run into a security
block: you can't access frames loaded from a different domain!

Solution: use relative paths to load the frames, so they are also
loaded from the "192.168.0.3" server.

Hans Kesting
Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.