...

View Full Version : Error--->"Access Denied"



battasrinivasa
12-28-2005, 07:16 PM
Hi All,

I am working with a toolbar. I have a function where i need to capture the colors userd in that page and display in another html page by popping up.

for that i am using the below code. This code is working fine when i am working with my local webserver when i tested in separate html pages. but when i kept it in the toolbar and calling the js file, it says "Access is Denied".

I worked with this functionality for 4 days and tried to debug. but no use. finally i am keeping this problem in net.

I am badly looking for help.

please check my Javascript code as below :
-------------------------------------------------------------------------

function colorslist() {
var swidth,sheight,sObj,lnkobj;
swidth=screen.width;
sheight=screen.height;
var mywindow = window.open ("http://www.rampweb.com/toolbar/colorcontrast.html", "mywindow","left=0,top=0,scrollbars=yes,status=yes,menubar=yes,location=yes,toolbar=yes,resizable=yes,width="+swidth+",height="+sheight+"");
sObj=mywindow.document.getElementsByTagName("head")[0].appendChild(mywindow.document.createElement("link"));

sObj.type = "text/css";
sObj.rel="stylesheet";
sObj.href="http://www.rampweb.com/toolbar/color_list.css";
so_createContainer();
so_getStyleSheetColors();
so_getInlineColors();
so_getAttributeColors();

xxobj=so_createColorTable();
var myobj = mywindow.document.getElementById("listcolors");
myobj.innerHTML=xxobj;
}colorslist();
-------------------------------------------------------------------------


Thanks in Advance.

prasad

_Aerospace_Eng_
12-28-2005, 10:48 PM
Javascript can't go across domains for security reasons which is why you get access denied.

battasrinivasa
12-31-2005, 12:04 PM
Hi there,

is it possible to get the previous page url and create a document object in the present page and work with that.

if we can could you please give me a smaple or sudo code for that?

thanks in advance

prasad



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum