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

Why is this not seen as same domain?

I have 2 iframes on a page, one of which i want to get it's location everytime it loads (and set an text input to that value). As the iframe is set to a domain not the same as the one where the script is, i use a proxy to navigate to that url....

ie

http://www.myscriptsdomain.com/proxy....urltoview.com

Thing is i'm getting permission denied/uncaught exception errors in FF.

[HTML]<script>
function frameonload(what) {
//var str = window.frames[0].location;
//var str = document.getElementById("affframe2").location.href ;
var str = parent.frames['affframe2'].location.href;
//var str = window.affframe2.location.href;
//var str = document.getElementById("affframe2").location;
//var str = document.frames['affframe2'].location.href;
//var str = unescape(what.src);
//str = str.substring(88);
//str = str.slice(0, -5);
document.getElementById('targeturl').value = str;
}
</script>

<div id="outer">
<iframe name="affframe2"
frameborder="0"
src="http://www.myscriptsdomain.com/proxy.php?url=http://www.urltoget.com"
id="affframe2"
name="affframe2"
onload="frameonload(this);">
</iframe>
</div>[/HTML]

As you can see i have tried every possibility i can think of, nothing works...

errors i get are:

Error: uncaught exception: Permission denied to get property Location.href

Error: uncaught exception: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://******************.php :: frameonload :: line 75" data: no]
Oct 10 '07 #1
1 1518
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

You may need to use document.domain. See same origin policy.
Oct 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Steven T. Hatton | last post by:
This is something I've been looking at because it is central to a currently broken part of the KDevelop new application wizard. I'm not complaining about it being broken, It's a CVS images. ...
3
by: Rob | last post by:
Hi, I have a popup which updates a field in the opening window then submits the form the field is in. If I try to use the popup again (performing the same action) i get an 'Access is denied'...
45
by: Brett | last post by:
If I do this without declaring a corresponding field, is it considered bad design? What are the advantages or disadvantages to either method? Notice there is not set. public string URL { get...
2
by: Steve M | last post by:
A few users today received the message "The trust relationship between this workstation and the primary domain failed" on their web browser while using an ASP.NET web app. The problem went away...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
7
by: Victor | last post by:
I've got two domain names sharing the same IP address that use ASP VBScript If I set a session variable with domain 1, it is only available for domain 1 - this is correct? If I set an...
9
by: Mark P | last post by:
Is the following safe: double min_value = -numeric_limits<double>::max(); Basically, I'm trying to get a negative number with a very large magnitude. Thanks, Mark
4
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi All, Our company is merging two production domains(from two different servers) onto one server. So during the migration we use an intranet testing server to hold all files from these two...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: 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)...
0
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...
0
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....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.