Visualizzazione dei risultati da 1 a 3 su 3

Visualizzazione discussione

  1. #1
    Utente di HTML.it
    Registrato dal
    Dec 2013
    Messaggi
    228

    jQuery: simulare click su elemento in iframe - problema con protocollo http/https

    Ciao qualcuno mi aiuta?

    Ho un div in cui facebook carica un iframe e inserisce il pulsante condividi (attraverso una chiamata ajax alla API).

    Sto cercando di far si che alla pressione di un tasto (per ora 'enter') si apra il popup di facebook
    codice:
    if(e.keyCode==13){ //TODO: millemila condizioni
        console.log('clicked');
        var a=$('#fbs>div>span>iframe').contents();//<-ERRORE
        var b=a.find('pluginShareButtonLink');
        b.click();
    }
    Il problema è che mi restituisce questo errore
    Uncaught SecurityError: Blocked a frame with origin "*MIOURL*" from accessing a frame with origin "https://www.facebook.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match

    Che devo fare? (la mia pagina è in http)
    Tutto questo perché i maledetti social network non mettono a disposizione protocolli standard e unificati...


    EDITcon twitter altro errore)
    Uncaught SecurityError: Blocked a frame with origin "****" from accessing a frame with origin "http://platform.twitter.com". The frame being accessed set "document.domain" to "twitter.com", but the frame requesting access did not. Both must set "document.domain" to the same value to allow access.
    Ultima modifica di SimoX90; 30-01-2014 a 14:52

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 © 2025 vBulletin Solutions, Inc. All rights reserved.