Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    funzione per modificare embed video

    dovrei realizzare una funzione che mi permetta di intercettare il tag OBJECT di un video e prenderne la width e l'height e qiundi impostarle nuovamente in base ad un width prestabilito mi estrapolo l'height relativo.

    siccome l'embed non ha ID, icoè, potrebbe anche averlo ma non lo saprei però sono sicuro che sarà l'unico object tag presente nella pagina
    Hosting, VPS, SSL e Domini: https://www.blooweb.it

  2. #2
    ho provsato così ma nopn funziona
    Codice PHP:
    function resizeobject() {
        var 
    allParas document.getElementsByTagName("object");
        
    width allParas[0].getAttribute("width");
        
    height allParas[0].getAttribute("height");
        
    nwidth 600;
        
    nheight roundTo((600/width)*height,0);
        
    //alert("There are " + nwidth + " X "+nheight);
        
    allParas[0].setAttribute("height",nheight);
        
    allParas[0].setAttribute("width",nwidth);

    Hosting, VPS, SSL e Domini: https://www.blooweb.it

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.