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

    impedire l'apertura dei frame, reinviare all'index.html

    Buonasera a tutti e Buone Feste.

    Il mio problema è abbastanza banale, ed in realtà avevo già la soluzione ma l'ho persa ..

    In pratica il sito è fatto con i "frame" (non "iframe"), questo per non far caricare ad ogni volta il menu a sinistra, lo so, scelta discutibile e non proprio amata da tutti ma mi sono sempre trovato abbastanza bene, ora però ho il problema che i motori di ricerca potrebbero indicizzare le varie pagine (anzi, sicuro che lo faranno) e quindi il sito resterebbe quasi inutilizzabile (verrebbe, ad esempio, caricata la pagina "menu.html" senza il resto..), c'era una stringa da inserire nelle varie pagine per obbligare il browser a caricare l'index (cioè la pagina principale) in caso questo succedesse, se c'è chi la conosce mi farebbe un grosso favore, sono due giorni che cerco..

    Grazie in anticipo per il Vostro aiuto.

    Tanti auguti per il Fine Anno (e andateci piano con la sbornie )

    Ciao.
    Riscopri il PC, installa ed usa Linux ;-)

    CDC PREMIUM 7043 DW - Centrino Duo T2300 - 512 Mb Ram - 80 Gb HD - Mandriva Linux 2007

  2. #2
    dovresti fare un controllo nella pagina centrale di una variabile che prendi dal frame di sinistra magari tramite javascript, se questa variabile non cè fai un redirect

  3. #3

    scusa, di script sono 0 tondo :-(

    Non conosco nessun linguaggio di programmazione (a parte l'HTML che non lo è..) quindi per me è arabo cosa mi dici..

    Il codice lo avevo trovato su un sito (forse pure questo..) ma non riesco più a rintracciarlo (sono passati diversi anni..), ricordo che era una stringa che dovevo inserire in tutte la pagine che avessero a che fare con i frame, e questa richiamava l'index, quindi se un motore la indicizzava all'apertura veniva richiamato il sito per completo, di più non so dirvi.

    Grazie comunque per il tuo interessamento.
    Riscopri il PC, installa ed usa Linux ;-)

    CDC PREMIUM 7043 DW - Centrino Duo T2300 - 512 Mb Ram - 80 Gb HD - Mandriva Linux 2007

  4. #4

    O forse trovato la soluzione, ma non so applicarla..

    Ho trovato su di un sito uno script che dovrebbe fare al caso mio, ma non capisco il suo funzionamento:

    http://www.hotscripts.com/Detailed/10889.html

    posto il codice che indicano:

    per l'index:

    codice:
    <script>
    
    
    
    /*
    
    ---------------------------------------------------------------------------
    
                  LINK DIRECTLY TO A PAGE IN FRAME OF FRAMESET
    
    ---------------------------------------------------------------------------
    
    Version:      1.1
    
    Date:         06-04-2003
    
    Author:       Jurjen van de Pol (vandepol-at-gmx-net)
    
    Download URL: http://www.xs4all.nl/~illegaal/vande...oframe_v11.zip
    
    Disclaimer:   No warranty of any kind comes with this script.
    
    Copyright:    Feel free to adjust or redistribute this code.
    
                  Please include this copyright notice.
    
    ---------------------------------------------------------------------------
    
    
    
    - Use "frameset.html?page=file" to specify which page is to be loaded
    
      in the specified frame of the frameset, specify the frame below remark 3.
    
    
    
      Example: frameset.html?page=welcome
    
              
    
    - The ".html" extension will be added by the script. This can be changed in 
    
      php, asp, etc. Just lookup the following code:  SRC='" +page + ".html'
    
      and change ".html" in the extension of your choice.
    
    - Make sure to use the special "body onload" tag in all of your frame pages, 
    
      see the enclosed example frame pages information.html and welcome.html.
    
    - Note: be sure to put all frameset variables between quotation marks '' 
    
      otherwise your page will generate errors. Copy-paste with care!
    
    ---------------------------------------------------------------------------
    
    */
    
    		 
    
    ref	= location.href;
    
    
    
    // 1. See if there is anything called (? or &)page=somepage_nr1
    
    //    within the string
    
    pageRE = /(\?|\&)page=(\w|,)*/;
    
    pageStr = ref.match(pageRE);
    
    
    
    // 2. Set the default page to be shown in the frame when the frameset is 
    
    //    loaded without parameters (like example: frameset.html)
    
    
    
    page = "welcome";
    
    
    
    if(pageStr != null) {
    
    	// remove the (? or &)page= part of the string
    
    	page = pageStr[0].substring(6, pageStr[0].length);
    
    	
    
    	// change all comma's back to slashes
    
    	page.replace("/,/", "/\//");
    
    }
    
    	
    
    document.write("<frameset rows='80,*' frameborder=YES border='1' framespacing='0'>");
    
    document.write(" <frame name='Topframe' scrolling=NO noresize src='navigation.html' >");
    
    
    
    // 3. Below is the description of the frame where the page specified by the 
    
    //    parameter "?page=..." is to be loaded in.
    
    
    
    document.write("<FRAME NAME='Mainframe' SRC='" +
    
    		page + ".html' SCROLLING=AUTO NORESIZE FRAMEBORDER='0'>");
    
    
    
    document.write("</FRAMESET><noframes>Put your no-frames content here (description + keywords), some search engine spiders cna't read frames en will only read this</noframes>");
    
    
    
    </script>
    e per le pagine:
    codice:
    <body OnLoad="if(parent.frames.length==0)top.location='frameset.html?page=information';">
    io ho due frame:

    menu.html (name sinistra)
    corpo.html (name destra)

    quelle sono richiamate direttamente dall'index, in seguito con il menu di sinistra si richiamano le altre pagine che si aprono nel frame di destra.

    I frame li devo usare perche ho scropt sia sul menu che nelle altre pagine dedicate alla navigazione, se li metto tutti in una pagina si bloccano e quindi sono "fregato"...

    Il frame descritto nell'articolo è diverso dal mio, ma comunque penso si possa adattare, posto il mio index.html:
    codice:
    <FRAMESET  framespacing="0" frameborder="0" border="false" COLS="180,*">
    <FRAME name="sinistra" noresize SRC="menu.html" SCROLLING=no MARGINWIDTH=0 MARGINHEIGHT=0>
    <FRAMESET framespacing="0" frameborder="0" border="false"  ROWS="*">
    <FRAME name="destra" noresize SRC="corpo.html" SCROLLING=auto MARGINWIDTH=0 MARGINHEIGHT=0>
    </FRAMESET>
      <noframes>
      <body>
      
    
    Questa pagina é fatta con i frames ma il tuo browser non li supporta.</p>
      
    
    Se questo succede, Ti prego di contattarmi via email</p>
      
    
    Webmaster</p>
      </body>
      </noframes>
    </frameset>
    Grazie a tutti e Buon Anno 2007
    Riscopri il PC, installa ed usa Linux ;-)

    CDC PREMIUM 7043 DW - Centrino Duo T2300 - 512 Mb Ram - 80 Gb HD - Mandriva Linux 2007

  5. #5

    Risolto

    Ok, risolto, sapevo che era unastupidata di script, ma non riuscivo a ritrovarlo:
    codice:
    <SCRIPT TYPE="text/javascript">
    if (parent.location.href == self.location.href) {
        if (window.location.href.replace)
            window.location.replace('index.html');
        else
            // causes problems with back button, but works
            window.location.href = 'index.html';
    }
    </SCRIPT>
    e questo in tutte le pagine del sito tranne l'index, se un motore le indicizza come "singole" l'effetto di aprirle ordinerà il "redirect" immediato alla pagina "mamma" (in questo caso "index.html").

    Ciao.
    Riscopri il PC, installa ed usa Linux ;-)

    CDC PREMIUM 7043 DW - Centrino Duo T2300 - 512 Mb Ram - 80 Gb HD - Mandriva Linux 2007

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 © 2024 vBulletin Solutions, Inc. All rights reserved.