Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Passaggio dati a DIV

  1. #1

    Passaggio dati a DIV

    Ciao Raga,
    Come faccio a passare delle variabili ad un Layer js
    ( vorrei ottenere un risultato tipo un alt )


    codice:
    
    <html>
    <head>
    <title>Untitled</title>
    
    <style type="text/css">
    <!--
    .longAlt {
    position:absolute;
    top:-1000;
    left:-1000;
    width:300;
    background-color:#ffffff;
    font-family:arial;
    font-size:8pt;
    border:1px solid black
    }
    -->
    </style>
    
    <script language="JavaScript" type="text/javascript">
    <!--
    var testo   = "";
    var entered = false;
    
    function pippo(anImage,aLeggenda) {
     e = event;
     if (entered == false) {
      testo           = document.getElementById(aLeggenda).innerHTML;
     } // if (entered == false)
     aDiv            = document.getElementById(aLeggenda);
     aDiv.style.left = e.clientX;
     aDiv.style.top  = e.clientY + 10;
    } // function pippo(anImage)
    
    function pippo2(anImage,aLeggenda) {
     aDiv            = document.getElementById(aLeggenda);
     aDiv.style.left = -1000;
     aDiv.style.top  = -1000; 
    }
    
    //-->
    </script>
    </head>
    <body>
    
    <div id="volo1" class="longAlt">
    
    <?PHP>    echo "MIA VARIABILE"; ?>    
    
    </div>
    
    [img]i1.jpg[/img]
    
    
    </body>
    </html>



















    .

  2. #2
    Utente di HTML.it L'avatar di mark2x
    Registrato dal
    Nov 2005
    Messaggi
    1,940
    Forse non ho ben inteso...

    Codice PHP:
    <div id="volo1" class="longAlt"><?=$MIA_VARIABILE?></div>

    [.:: JaguarXF ::.]
    __________________

  3. #3
    Devo essere sincero.... non l'ho ancora provato, ma mi sembrava troppo semplice come soluzione.

    Se ho un ciclo che mi genera un tot di record, e vorrei passare le variabili di quel record al div, e possibile che cosi mi funzioni ?

    Ho provato ad inserire le variabili all'interno dell'alt e mi funziona ma non ho ancora provato con questo script.

    Forse è meglio se faccio un tentativo ??!!









    .

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.