Access Denied Code:0

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sergio del Amo

    Access Denied Code:0

    Hi,
    I implemented a Web-Site based in remote scripting with hidden frames. I
    am using Javascript to provide dynamic functionality. In the machine's
    local server works perfectly but when i uploaded to my hosting site i
    obtain:
    Error "Access Denied" Code:0

    The function where i get the error is the next. Exactly in the line 31

    27: function serverLoad(pX,r X)
    28: {
    29: var server="http://www.mydomain.co m/";
    30: var url = server + pX + '&return=' + rX;
    31: parent.frames["Buffer"].document.locat ion.href=url;
    32: }

    ulr variable contains before this line the next value:


    In my local machine i was using in the line 29:
    var server="http://localhost/";
    And i did not have any problem. I tried also in the hosting server with
    localhost with success.
    I tried giving permisions to everyfile involved but i have not managed
    to solve this problem. Can anyone help me?
    Thanks in advanced!
  • Jc

    #2
    Re: Access Denied Code:0

    Sergio del Amo wrote:[color=blue]
    > Hi,
    > I implemented a Web-Site based in remote scripting with hidden frames. I
    > am using Javascript to provide dynamic functionality. In the machine's
    > local server works perfectly but when i uploaded to my hosting site i
    > obtain:
    > Error "Access Denied" Code:0
    >
    > The function where i get the error is the next. Exactly in the line 31
    >
    > 27: function serverLoad(pX,r X)
    > 28: {
    > 29: var server="http://www.mydomain.co m/";
    > 30: var url = server + pX + '&return=' + rX;
    > 31: parent.frames["Buffer"].document.locat ion.href=url;
    > 32: }
    >
    > ulr variable contains before this line the next value:
    > http://www.mydomain.com/scripts/inde...=afterfunction
    >
    > In my local machine i was using in the line 29:
    > var server="http://localhost/";
    > And i did not have any problem. I tried also in the hosting server with
    > localhost with success.
    > I tried giving permisions to everyfile involved but i have not managed
    > to solve this problem. Can anyone help me?
    > Thanks in advanced![/color]

    Refer to http://www.jibbering.com/faq/#FAQ4_19.

    You are possibly accessing your website as mydomain.com (instead of
    www.mydomain.com) in your browser, causing the problem
    (www.mydomain.com != mydomain.com). You really don't need to be using
    absolute URL's in the first place. Change it to a relative path, which
    will improve the portability of your code. In your example code, simply
    change server to be equal to "/".

    Comment

    • Sergio del Amo

      #3
      Re: Access Denied Code:0

      > You are possibly accessing your website as mydomain.com (instead of[color=blue]
      > www.mydomain.com) in your browser, causing the problem
      > (www.mydomain.com != mydomain.com). You really don't need to be using
      > absolute URL's in the first place. Change it to a relative path, which
      > will improve the portability of your code. In your example code, simply
      > change server to be equal to "/".
      >[/color]
      Thanks a lot!! you gave me the clue!!!

      Comment

      Working...