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

    [XSLT] refresh non richiesto...

    testando le mie pagine xml+xsl con explorer 6 mi sono accorto che molte volte... sopratutto se una volta ho inviato qualche form... la pagina mi si refresha, o peggio ancora torna alla pagina prima

    il tutto subito poco prima o poco dopo che ha finito di caricare la pagina....


    cioè... quando per esempio ho inviato il form e clicco su un link... molte volte vedo per un istante la pagina che voglio... ma dopo l'istante ritorna non sop erchè sulla pagina di prima....


    eppure non ho usato nessuna alchimia nel mio xsl... pagine e comandi semplici......







    qualcuno ne sa qualcosa?



  2. #2
    Dubito dipenda da XSL. A meno che tu non abbia inserito comandi JS.

    Riguarda il codice ASP e JS e posta qualche riga di codice.
    Are you alive?
    No, but I was written with LOVE. A new scripting language.
    www.frequenze.it

  3. #3
    le pagine sono generate da un sistema di template fatto in php... ma il file xsl fiene scritto fisicamente sul disco del server... così la pagina che vede il browser è identica ad una statica...

    non ci sono ne comandi js ne qualasiasi altro tipo...
    non ci sono css... ne tabelle...

    solo form input e dei
    per separare le righe create dall'xml..


    tutto qui...

    e puntualmente dopo che invio qualche form (non sempre, ma molte volte) le pagine iniziano a fare capricci...



    questo è l'XML
    Codice PHP:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml
    -stylesheet type="text/xsl" href="getxsl.php?s=4xfqrsjznuf5usc008kc808kw_admin_usergroups_manage"?>

    <global s="4xfqrsjznuf5usc008kc808kw" bname="OverKontrol" user="Zan">
    <usergroups>
    <usergroup id="1" title="Non Registrati" pid="0" type="1" num="2" order="1"/>
    <usergroup id="2" title="Amministratori" pid="0" type="1" num="0" order="2"/>
    <usergroup id="3" title="Members" pid="0" type="1" num="0" order="3"/>
    <usergroup id="4" title="Capo 1" pid="0" type="2" num="1" order="1"/>
    <usergroup id="5" title="Suddito Capo 1" pid="4" type="2" num="0" order="1"/>
    <usergroup id="6" title="Suddito 2 Capo 1" pid="4" type="2" num="0" order="2"/>
    <usergroup id="11" title="PROVA FINALE" pid="5" type="2" num="0" order="1"/>
    <usergroup id="10" title="asdasdasd" pid="4" type="2" num="0" order="88"/>
    <usergroup id="9" title="asdasda" pid="4" type="2" num="0" order="77"/>
    <usergroup id="12" title="prova finale 2" pid="0" type="2" num="0" order="11"/>
    <usergroup id="13" title="prova suddito finale" pid="12" type="2" num="0" order="111"/>
    <usergroup id="14" title="prova noeredity finale" pid="0" type="1" num="0" order="12"/></usergroups>
    </global>


    mentre questo è l'xsl



    Codice PHP:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">

    <xsl:output method="html" encoding="UTF-8" indent="yes" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" doctype-public="-//W3C//DTD XHTML 1.1//EN"
    omit-xml-declaration="no"/>

    <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title><xsl:value-of select="/global/@bname"/></title>
    </head>
    <body>
    <div>[url="{/global/@s},index.html"]Admin Home[/url]


    [b]Options[/b]

    [url="modify,2,{/global/@s},options.html"]Board Status[/url]

    [url="modify,3,{/global/@s},options.html"]Basic Options[/url]

    [url="modify,4,{/global/@s},options.html"]Sessions[/url]

    [url="modify,5,{/global/@s},options.html"]Headers[/url]


    [url="modify,23,{/global/@s},options.html"]Url Rewriting[/url]


    [url="modify,24,{/global/@s},options.html"]International Sys[/url]


    [url="modify,35,{/global/@s},options.html"]Time Settings[/url]


    [url="modify,37,{/global/@s},options.html"]Registration[/url]





    [b]Users and Groups[/b]

    [url="users.php?action=add&amp;id=0&amp;s={/global/@s}"]Add User[/url]

    [url="usergroups.php?action=add&amp;id=0&amp;s={/global/@s}"]Add User Group[/url]

    [url="usergroups.php?action=manage&amp;id=0&amp;s={/global/@s}"]Manage User Groups[/url]

    [url="profilefields.php?action=select&amp;id=0&amp;s={/global/@s}"]Add User Profile Field[/url]

    [url="profilefields.php?action=manage&amp;id=0&amp;s={/global/@s}"]Manage User Profile Fields[/url]





    [b]Sections[/b]

    [url="sections.php?action=add&amp;id=0&amp;s={/global/@s}"]Add Section[/url]

    [url="sections.php?action=list&amp;id=0&amp;s={/global/@s}"]Modify Sections[/url]



    [b]International Sys[/b]

    [url="add,0,{/global/@s},internationalsys.html"]Add Country[/url]

    [url="list,0,{/global/@s},internationalsys.html"]List Countries[/url]

    [url="import,0,{/global/@s},internationalsys.html"]Import Ip's Database[/url]




    [b]Output[/b]

    [url="add,0,,{/global/@s},style.html"]Add Style[/url]

    [url="addnew,0,,{/global/@s},template.html"]Add Template[/url]

    [url="manage,0,,{/global/@s},style.html"]Manage Styles[/url]




    [b]Nav Details[/b]

    [url="addgroup,0,{/global/@s},navdetails.html"]Add Group[/url]

    [url="listgroups,0,{/global/@s},navdetails.html"]Edit Groups[/url]

    [url="adddet,0,{/global/@s},navdetails.html"]Add Detail[/url]

    [url="listdet,0,{/global/@s},navdetails.html"]Edit Details[/url]

    [url="logs.php?action=navdetails&amp;s={/global/@s}"]View Logs[/url]


    </div>


    <xsl:apply-templates select="global/usergroups"/>



    </body>
    </html>
    </xsl:template>


    <xsl:template match="usergroups">
        <div>
            [b]USERGROUP LIST[/b]



            <table cellpadding="0" cellspacing="0" border="0">

            <tr><td colspan="6">[b]Normal Groups[/b]</td></tr>

                <xsl:call-template name="buildnormalgroups"/>

            </table>

            

            
            <table cellpadding="0" cellspacing="0" border="0">

            <tr><td colspan="6">[b]Eredity Groups[/b]</td></tr>

                <xsl:call-template name="buildereditygroups"/>

            </table>
        </div>
    </xsl:template>



    <xsl:template name="buildnormalgroups">
        

        <xsl:for-each select="/global/usergroups/usergroup[@type = 1]">

            <xsl:sort select="@order" order="ascending"/>

            <tr>
                <td width="200"><xsl:value-of select="@title"/></td>
                <td width="100">[url="usergroups.php?action=edit&amp;id={@id}&amp;s={/global/@s}"]Edit[/url]</td>

                <td width="100">
                    <xsl:if test="@id != 1 and @id != 2 and @id != 3">
                        [url="usergroups.php?action=delete&amp;id={@id}&amp;s={/global/@s}"]Delete[/url]
                    </xsl:if>
                </td>

                <td width="100">
                    <xsl:if test="@id != 1">
                        [url="users.php?action=add&amp;id={@id}&amp;s={/global/@s}"]Add User[/url]
                    </xsl:if>
                </td>
                
                <td width="50"><xsl:if test="@id != 1"><xsl:value-of select="@num"/></xsl:if></td>
                
                <td width="100">
                    <xsl:if test="@id != 1">
                        [url="users.php?action=list&amp;id={@id}&amp;s={/global/@s}"]List Users[/url]
                    </xsl:if>
                </td>
            </tr>        

        </xsl:for-each>

    </xsl:template>

    <xsl:template name="buildereditygroups">

        <xsl:param name="pid">0</xsl:param>
        <xsl:param name="prefix">--</xsl:param>

        <xsl:for-each select="/global/usergroups/usergroup[@pid = $pid][@type = 2]">

            <xsl:sort select="@order" order="ascending"/>

            <tr>
                <td width="200"><xsl:value-of select="$prefix"/><xsl:text> </xsl:text><xsl:value-of select="@title"/></td>
                <td width="100">[url="usergroups.php?action=edit&amp;id={@id}&amp;s={/global/@s}"]Edit[/url]</td>

                <td width="100">
                    <xsl:if test="@id != 1 and @id != 2 and @id != 3">
                        [url="usergroups.php?action=delete&amp;id={@id}&amp;s={/global/@s}"]Delete[/url]
                    </xsl:if>
                </td>

                <td width="100">
                    <xsl:if test="@id != 1">
                        [url="users.php?action=add&amp;id={@id}&amp;s={/global/@s}"]Add User[/url]
                    </xsl:if>
                </td>
                
                <td width="50"><xsl:if test="@id != 1"><xsl:value-of select="@num"/></xsl:if></td>
                
                <td width="100">
                    <xsl:if test="@id != 1">
                        [url="users.php?action=list&amp;id={@id}&amp;s={/global/@s}"]List Users[/url]
                    </xsl:if>
                </td>
            </tr>

            <xsl:if test="/global/usergroups/usergroup[@pid = current()/@id][@type = 2]">

                <xsl:call-template name="buildereditygroups">
                       <xsl:with-param name="pid" select="@id"/>
                    <xsl:with-param name="prefix" select="concat($prefix,'--')"/>
                </xsl:call-template>

              </xsl:if>

        </xsl:for-each>

    </xsl:template>

    </xsl:stylesheet>

  4. #4
    Io le ho mandate in esecuzione sul mio server ASP e tutto e' normale... sicuro non dipenda dal fatto che il tuo XSL ha estensione PHP? ... azzardo: qualche istruzione eseguita dopo il caricamento della pagina?

    p.s. posso vederla in linea? con il motore php attivo?
    Are you alive?
    No, but I was written with LOVE. A new scripting language.
    www.frequenze.it

  5. #5
    si... ti mando in pvt user e pass per accedere...


    P.S

    questo è il codice di getxsl.php

    Codice PHP:
    <?php

    error_reporting
    (15);

    if (
    file_exists("temp/xsl/".$_GET['s'].".xsl")) {

        
    header('Content-type: text/xml');
        
        echo 
    implode(file("temp/xsl/".$_GET['s'].".xsl"), "");
        
        
    unlink("temp/xsl/".$_GET['s'].".xsl");
    }


    ?>

  6. #6
    E' il primo PHP che incontro che funzia solo su IE

    Ho visto che quando si clicca su una delle voci dell'elenco c'e' uno strano doppio refresh. Non so che sia, ma e' possibile sia dovuto al fatto che prima vengono ricaricate tutte le voci (ovvero quella parte gia' in cache) e successivamente le form, che invece sono un nuovo elemento.

    Puo' essere? Non mi e' ancora ben chiaro qual e' il comportamento della cache relativamente ad un file xml, i cui nodi, teoricamente, potrebbero essere caricati in asincrono.

    :master:
    Are you alive?
    No, but I was written with LOVE. A new scripting language.
    www.frequenze.it

  7. #7
    Originariamente inviato da Mutato
    E' il primo PHP che incontro che funzia solo su IE


    ho visto che sei entrato con opera 7... non ho aggiunto la relativa chiava nel dettagli e quindi non ti fa entrare...


    a me l'xsl funziona anche su mozzilla... oltre che su explorer

  8. #8
    (e su mozzilla non mi fa il refresh )

  9. #9
    cmq ho notato una cosa... mozilla non memorizza in cache un ca..o, e forse hai ragione.. potrebbe essere questa la causa...


    provo ad aggiungere gli header per il nocache... :master:



    certo che è proprio mooolto strano tutto questo...... mi ero preso davvero bene con l'xslt

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.