Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 17 su 17
  1. #11

  2. #12
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    situazione molto complessa da ricreare,
    se puoi lasciare un link ci si puo' dare un' occhiata

  3. #13
    Grazie Xinod per l'interessamento...
    dopo un pò di ricerche ho iniziato a capirci qualcosa.
    questo thread http://forum.html.it/forum/showthrea...accesso+negato aperto da pieroseko credo che parli dello stesso problema.
    Però non l'ho ancora bene inquadrato... il comportamento di IE (FF non dà alcun errore), il famoso accesso negato..., lo dobbiamo a questo errore?

    :::
    ho trovato questo sul sito della microsoft

    È necessario apportare modifiche al codice esistente per interagire con Windows XP Service Pack 2?

    Se l'applicazione provoca errori di accesso negato, è necessario ripetere la memorizzazione nella cache dell'oggetto prima di accedervi tramite uno script. Nell'esempio seguente, il contesto di protezione non è convalidato quando la proprietà designMode è impostata su un oggetto documento:

    Esempio di script non valido

    var d = myFrame.document;
    d.designMode = "On";
    d.open(); <-------------------------causa un errore di autorizzazione negata.

    Esempio di script corretto

    var d = myFrame.document;
    d.designMode = "On";
    d = myFrame.document; // ripristina il puntatore all'oggetto documento.
    :::

    E cioè?! Nel mio caso ho semplicemente questo script:
    :::
    if (!document.all) {
    altdiv=document.getElementById("notizia<?=$_GET[Posizione];?>").offsetHeight ;
    lardiv=document.getElementById("notizia<?=$_GET[Posizione];?>").offsetWidth ;
    if (window.screen) {
    window.resizeTo(lardiv+250,altdiv+250);
    window.moveTo(window.screen.width-(lardiv+250),0);
    }
    posx=getPosX(document.getElementById('notizia<?=$_ GET[Posizione];?>'))-125;
    posy=getPosY(document.getElementById('notizia<?=$_ GET[Posizione];?>'))-80;
    window.scroll(posx, posy);
    }
    :::

    che trasformato in
    :::
    altdiv='';
    lardiv='';
    posx='';
    posy='';
    altdiv=document.getElementById("notizia<?=$_GET[Posizione];?>").offsetHeight ;
    lardiv=document.getElementById("notizia<?=$_GET[Posizione];?>").offsetWidth ;
    if (window.screen) {
    window.resizeTo(lardiv+250,altdiv+250);
    window.moveTo(window.screen.width-(lardiv+250),0);
    }
    posx=getPosX(document.getElementById('notizia<?=$_ GET[Posizione];?>'))-125;
    posy=getPosY(document.getElementById('notizia<?=$_ GET[Posizione];?>'))-80;
    window.scroll(posx, posy);
    :::
    sembrerebbe funzionare (fa parte di un ciclo, e quindi ad ogni passaggio prima svuoto le variabili e poi le riempio nuovamente).

    Solo che non capisco come possa essere questa una soluzione? che c'entra?!
    Poi però ho un altro problema e quindi ancora non ho risolto ma perchè svuotando le variabili per questa porzione di codice non ottengo più errore?!

    E più in generale... dove posso trovare informazioni sull'errore accesso negato, per capire un pò meglio quando questo si manifesta?!

    Ciao e tutti e grazie...

  4. #14

    Allora...

    Allora, vediamo se si arriva al punto. Devo cercare di risolvere questo problema, altrimenti ne esco pazzo.

    Situazione: ho un sistema che mi permette di vedere il preview di ciò che sto scrivendo in un editor html (fckeditor) direttamente per come sarà una volta pubblicato (cioè nella sua posizione e con la formattazione stylesheet attribuita).
    Riesco a fare questo, aprendo una pop-up e prendendo i valori tramite window.opener all'interno dell'editor stesso nella finestre principale.
    Nel pop-up (la finestra di preview) ho una funzione setInterval che ogni secondo mi prende i dati, appunto, dalla window.opener e li stampa all'interno della pagina stessa.

    Intendiamoci, tutto funzionante.

    Però: sono riuscito ad implementare un sistema in cui la finestra di preview, una volta caricata la pagina, mi si ridimensiona in base al contenuto del div preview e con lo scroll centro automaticamente quel div nella finestra.

    Tutto bene, se non chè su FireFox posso continuamente controllare questa opzione (e quindi se l'utente nell'editor scrive di +, la finestra preview si ridimensiona in base al nuovo contenuto), mentre su IE, la prima volta ok ma le successive (i cicli che ho attivato tramite il setInterval) ottengo errori di "accesso negato".

    CHE CAZZO E' QUESTO ACCESSO NEGATO!!!???

    Cercando in giro non sono riuscito a capire bene... c'è qualcuno a cui viene l'intuizione giusta per capire il perchè di questo errore e aiutarmi al fine di permettere il comportamento sopra descritto anche su IE?

    HELP!!!

  5. #15
    There is a workaround for the local-only problem: In the first parameter of the window.open() method call, load a real document (even if it is a content-free HTML document) into the sub-window before using document.write() to generate content for the subwindow. The loading action 'legitimizes' the window as coming from the same domain as your main window's document.

    Ho trovato questo, che fa parte di questo testo:

    Q. What does the IE "Access is Denied" error mean?
    A. The "Access Denied" error in any browser usually means that a script in one window or frame is trying to access another window or frame whose document's domain is different from the document containing the script. What can seem odd about this is that you get this error in IE for Windows frequently when a script in one window generates a new window (with window.open()), and content for that other window is dynamically created from the same script doing the opening. The focus() method also triggers the error.
    The error can also occur if scripts try to access objects, properties, or methods that have been locked down by Microsoft's security platoon. For instance, the document.styleSheets.rules property used to be accessible in IE 5 and IE 5.5, but is not in IE 6.
    For the new window problem, there is a bit of history associated with the problem and workarounds. For example, the problem occurs frequently when the scripts are being run from the local hard disk. You get a clue about the situation in the titlebar of the new window: It forces an about:blank URL to the new window, which is a protocol:domain that differs from wherever your main window's script comes from. If, however, you put the same main window document on a server, and access it via http:, the problem goes away.
    There is a workaround for the local-only problem: In the first parameter of the window.open() method call, load a real document (even if it is a content-free HTML document) into the sub-window before using document.write() to generate content for the subwindow. The loading action 'legitimizes' the window as coming from the same domain as your main window's document.


    Quindi, quale soluzione viene proposta?! Io non utilizzo il document.write per scrivere nella pop.up ma l'innerHTML all'interno di + elementi div.
    Che dite?

  6. #16
    la stupidità di IE non ha mai fine... intuizioni?!

  7. #17
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    non vorrei dire boiate (e ho talmente tanti problemi con le macchine al momento che non posso fare prove), ma
    tu non apri una popup con indirizzo about:blank o nulla (= non e' li' il problema)
    ma l' iframe con il designMode=on cosa apre?
    se apre una pagina che fisicamente esiste sul server non avrai l' accesso negato,
    se apri niente e scrivi x es. di document.write() stai scrivendo su di una pagina fittizia che non risulta appartenente allo stesso dominio

    forse e' il caso di smontare un po' l' fckeditor e di accertarti che apra una pagina realmente esistente, anche solo per toglierti il dubbio...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.