...

View Full Version : Error: uncaught exception: Permission denied to get property HTMLDocument.getElements



JAVAEOC
04-02-2005, 08:53 PM
newdoc = "";
function Create(){
newdoc = window.open('sURL_here', true);
}
function Change(){
alert(newdoc.document.getElementsByName("top").value);
}


when I call the change function I get this error: Error: uncaught exception: Permission denied to get property HTMLDocument.getElementsByName

how can I fix this, get around it???

thanks

Harry Armadillo
04-03-2005, 06:20 AM
Is sURL in the same domain as your page? Cross-site scripted interaction is generally not allowed. Plus, getElementsByName returns a collection, not an element -- use newdoc.document.getElementsByName("top")[0].value or similar.

JAVAEOC
04-06-2005, 11:10 PM
thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum