Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Error--->"Access Denied"

    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=ye s,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

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Javascript can't go across domains for security reasons which is why you get access denied.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jun 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow getting previous page url from browser history

    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •