Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 24

Discussione: Miscela js e php

  1. #1

    Miscela js e php

    Ciao.
    Mi sono trovato davanti un problema a cui da stamattina non ho trovato soluzione!
    ho questo codice
    Codice PHP:
    scheda/scheda2.php?Nick=$row[Nick
    la pagina che deve aprirsi deve essere una nuova finestra quindi:
    codice:
    <script language="Javascript">
    function scheda()
    {
      window.open('url','personaggi','toolbar=0,menubar=0,directories=0,location=0,scrollbars=1,status=0,resizable=1');
    }
    </script>
    ora io dovrei inserire il primo codice nel secondo in modo tale che nel link dovrei scrivere
    codice:
    Scheda
    ma come faccio??

    aiutooooooo
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  2. #2
    non si può fare?
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  3. #3
    ci sono riuscito facendo in questo modo:
    Codice PHP:
    $query "SELECT * FROM pgu WHERE Stato>='12' ORDER BY 'ID' ASC";
    $result mysql_query($query$db);
    while (
    $row mysql_fetch_array($result)) {
    //
    echo "<script language='Javascript'>
    function scheda()
    {
      window.open('scheda/scheda2.php?Nick=
    $row[Nick]','personaggi','toolbar=0,menubar=0,directories=0,location=0,scrollbars=1,status=0,resizable=1');
    }
    </script>"
    ;
    //
     
    echo "<center><table border='1'><td width='200'>[b]$row[Nick][/b]</td><td>[url='#']<img src=/img/$row[Simbolo] width='20' height='20' border='no'>[/url]</tr></table></center>"; } 
    ma ho un problema...perchè quando apro la scheda, mi esce sempre lo stesso utente?
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  4. #4
    in questo modo dichiari più volte la stessa funzione js
    fai una cosa del genere

    codice:
    echo "<script>
            function scheda(nick) {
               window.open('scheda/scheda2.php?Nick='+nick,'personaggi','toolbar=0 ,menubar=0,directories=0,location=0,scrollbars=1,status=0,resizable=1');
    
            }
          </script>";
    $query = "SELECT * FROM pgu WHERE Stato>='12' ORDER BY 'ID' ASC";
    $result = mysql_query($query, $db);
    while ($row = mysql_fetch_array($result)) {
              echo "<center><table border='1'><td width='200'>$row[Nick]</td><td><img src=/img/$row[Simbolo] width='20' height='20' border='no'></tr></table></center>"; } 
    }
    E' la mia opinione ed io la condivido
    Non condivido la tua idea ma darei la vita perché tu la possa esprimere (Voltaire)
    Scrivi sul muro

  5. #5
    purtroppo non va!!!
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  6. #6
    il codice js mettilo sempre così:

    $codice_php;
    ?>
    inizio_codice_js<? echo $variab_php; ?>
    altro_js
    <?php
    $altro_php

    chiaro?
    ***************************************
    the fate of all mankind i see is in the hands of fool
    ---peter sinfield----

  7. #7
    e come faccio?
    il codice js deve avere degli spezzoni di php
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  8. #8
    aspetta un minuto e ti do un mio esempio...
    ***************************************
    the fate of all mankind i see is in the hands of fool
    ---peter sinfield----

  9. #9
    eccho un esempio stupido che forse non c'entra molto ma da una idea:
    codice:
    <a href="javascript:Popup('exp/viewer.php?extract=metabolita&value=<?php echo "$id_metab" ?>')">
    questo è dentro un codice html...
    ***************************************
    the fate of all mankind i see is in the hands of fool
    ---peter sinfield----

  10. #10
    Codice PHP:
    <script>
            function scheda(Nick) {
               window.open('scheda/scheda2.php?Nick='+Nick,'personaggi','toolbar=0  ,menubar=0,directories=0,location=0,scro
    llbars=1,status=0,resizable=1');

            }
          </script>
    <?php

    $query 
    "SELECT * FROM pgu WHERE Stato>='12' ORDER BY 'ID' ASC";
    $result mysql_query($query$db);
    while (
    $row mysql_fetch_array($result)) {
              echo 
    "<center><table border='1'><td width='200'>[b]$row[Nick][/b]</td><td>[url='#']<img src=/img/$row[Simbolo] width='20' height='20' border='no'>[/url]</tr></table></center>"; } 



    ?>
    manco va!!!
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

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.