I have a website and my domain is registered through Network Solutions (whom I would recommend not ). I use the web-forwarding function, which allows me to “mask” my domain so that when a user visits http://lucasmccoy.com they actually see http://lucasmccoy.comlu.com/ through an HTML frame. The advantages of this is that the address bar is still showing http://lucasmccoy.com/.
The disadvantages are that I cannot directly edit the HTML page in which the frame is located. For example, I cannot change the page name or icon. I tried to do it like this:
$(function() {
parent.document.title = 'Lucas McCoy';
});
But of course this gives me a JavaScript error:
Unsafe JavaScript attempt to access frame with URL http://lucasmccoy.com/ from frame with URL http://lucasmccoy.comlu.com/. Domains, protocols and ports must match.
I reviewed this question while trying to do the same, except that the OP has access to other HTML pages, while I do not.
Is it in JavaScript / jQuery to make a cross-domain query in the DOM when you do not have access to this domain? Or is this something that browsers simply will not allow for security reasons.
source
share