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

Discussione: sintax in php

  1. #1

    sintax in php

    //Salve, ho questo problema
    //Devo scrivere in php l'output html seguenti...come fare?

    grazie mille


    <img src="Image1.jpg" onmouseout="function (event) {alert('here I am');}" onmouseover="function (event) {alert('he went thataway');}"

  2. #2
    Utente di HTML.it L'avatar di strae
    Registrato dal
    Apr 2008
    Messaggi
    407

    Re: sintax in php

    [QUOTE]Originariamente inviato da niquesca
    //Salve, ho questo problema
    //Devo scrivere in php l'output html seguenti...come fare?

    grazie mille


    [img]Image1.jpg[/img]';
    [/PHP]

    //ma se devi outputtare html puro, perchè lo fai da php?
    You HAVE to assume your visitor is a maniac serial killer, out to destroy your application. And you have to prevent it.
    I can accept failure, everyone fails at something - But I can't accept not trying.

  3. #3
    scusa strae, ma c'erano un paio di errori

    Codice PHP:
    echo '<img src="Image1.jpg" onmouseout="function (event) {alert(\'here I am\');}" onmouseover="function (event) {alert(\'he went thataway\');}"'
    PHP LEARN - Guide, tutorial e articoli sempre aggiornati
    NUOVO: standardLib; il potente framework PHP é ora disponibile
    *******************************************
    Scarica oggi la tua copia di MtxEventManager

  4. #4
    No, probabilmente non c'erano, mi ha mangiato via le barre rovesciate!
    Aspetta che riprovo

    Codice PHP:
    <?php
    echo '[img]Image1.jpg[/img]
    PHP LEARN - Guide, tutorial e articoli sempre aggiornati
    NUOVO: standardLib; il potente framework PHP é ora disponibile
    *******************************************
    Scarica oggi la tua copia di MtxEventManager

  5. #5
    Ok, niente da fare.

    Prima dei quattro apici nella stringa devi mettere delle barre rovesciate "\".

    PHP LEARN - Guide, tutorial e articoli sempre aggiornati
    NUOVO: standardLib; il potente framework PHP é ora disponibile
    *******************************************
    Scarica oggi la tua copia di MtxEventManager

  6. #6
    Utente di HTML.it L'avatar di strae
    Registrato dal
    Apr 2008
    Messaggi
    407
    Originariamente inviato da mtx_maurizio
    Ok, niente da fare.

    Prima dei quattro apici nella stringa devi mettere delle barre rovesciate "\".

    //Si infatti io li avevo messi i backslash
    You HAVE to assume your visitor is a maniac serial killer, out to destroy your application. And you have to prevent it.
    I can accept failure, everyone fails at something - But I can't accept not trying.

  7. #7
    ciao a tutti e grazie...

    Per rispondere alle domande ...sto lavorando con delphifphp....sto modificando una funzione che ho in una classe relativa al componente griglia... vorrei con il passaggio del mouse su una cella della griglia che contiene un'immagine aprire l'immagine ingrandita.
    dietro indicazioni precise ho scritto la funzione di seguito riportata
    ////////////////////////////////////////////////////////////////////////////////////////////////////
    qx.Proto._getContentHtml = function(cellInfo) {
    var IconDataCellRenderer = qx.ui.table.IconDataCellRenderer;
    var urlAndToolTip = this._getImageInfos(cellInfo);
    var html = IconDataCellRenderer.IMG_START;
    html += urlAndToolTip.url;
    var tooltip = urlAndToolTip.tooltip ;
    html += IconDataCellRenderer.IMG_END;
    return html;

    //html restituisce questo
    e fin qui è giusto...ma manca l'aggiunta degli eventi onmouseout e onmouseover ...infatti html finale dovrebbe restituirmi tutto questo:
    /////////////////////////////////////////////////////////////////
    //<img src="Image1.jpg" width="105" height="105" border="0" onmouseout="function (event) {alert('here I am');}" onmouseover="function (event) {alert('he went thataway');}"
    /////////////////////////////////////////////////////////////////

    Ho seguito i vostri suggerimenti ma...probabilmente non ho posizionato gli
    backslash correttamente..potreste inserire al posto della barra la lettera I in modo da farmi capire dove devo posizionare le barre?

    grazie mille

  8. #8
    Utente di HTML.it L'avatar di strae
    Registrato dal
    Apr 2008
    Messaggi
    407
    [QUOTE]Originariamente inviato da niquesca
    ciao a tutti e grazie...

    Per rispondere alle domande ...sto lavorando con delphifphp....sto modificando una funzione che ho in una classe relativa al componente griglia... vorrei con il passaggio del mouse su una cella della griglia che contiene un'immagine aprire l'immagine ingrandita.
    dietro indicazioni precise ho scritto la funzione di seguito riportata
    ////////////////////////////////////////////////////////////////////////////////////////////////////
    qx.Proto._getContentHtml = function(cellInfo) {
    var IconDataCellRenderer = qx.ui.table.IconDataCellRenderer;
    var urlAndToolTip = this._getImageInfos(cellInfo);
    var html = IconDataCellRenderer.IMG_START;
    html += urlAndToolTip.url;
    var tooltip = urlAndToolTip.tooltip ;
    html += IconDataCellRenderer.IMG_END;
    return html;

    //html restituisce questo
    e fin qui è giusto...ma manca l'aggiunta degli eventi onmouseout e onmouseover ...infatti html finale dovrebbe restituirmi tutto questo:
    /////////////////////////////////////////////////////////////////
    //[img]Image1.jpg[/img]

    Il forum pialla i backslash solo nei campi codice
    You HAVE to assume your visitor is a maniac serial killer, out to destroy your application. And you have to prevent it.
    I can accept failure, everyone fails at something - But I can't accept not trying.

  9. #9
    sapreste dirmi perchè scrivendo questa riga

    html += onmouseout=" function (event) {alert(\'here I am\');}" onmouseover="function (event) {alert(\'he went thataway\');}">


    ho il seguente errore?
    Parse error: syntax error, unexpected T_FUNCTION in C:\Inetpub\wwwroot\ordini\vcl\dbgrids.order.inc.ph p on line 740

  10. #10
    Utente di HTML.it L'avatar di strae
    Registrato dal
    Apr 2008
    Messaggi
    407
    Originariamente inviato da niquesca
    sapreste dirmi perchè scrivendo questa riga

    html += onmouseout=" function (event) {alert(\'here I am\');}" onmouseover="function (event) {alert(\'he went thataway\');}">


    ho il seguente errore?
    Parse error: syntax error, unexpected T_FUNCTION in C:\Inetpub\wwwroot\ordini\vcl\dbgrids.order.inc.ph p on line 740
    Ma stiamo ancora parlando di codice php?

    Perchè a rigor di logica dovrebbe essere qualcosa del tipo:

    $html += 'onmouseout=" function (event) {alert(\'here I am\');}" onmouseover="function (event) {alert(\'he went thataway\');}">';
    You HAVE to assume your visitor is a maniac serial killer, out to destroy your application. And you have to prevent it.
    I can accept failure, everyone fails at something - But I can't accept not trying.

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.