Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di fanoste
    Registrato dal
    Oct 2005
    Messaggi
    271

    help codice asp. dove sbaglio?

    ciao a tutti.
    ho una pagina (pagina1) che visualizza:
    - l'ultimo record inserito
    - la lista degli ultimi 5 record precedenti.

    ora vorrei che cliccando su uno dei record nella lista mi si aprisse in visualizzazione il record completo.

    ecco il codice della prima pagina
    <%@LANGUAGE="JAVASCRIPT"%>

    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    <%
    var streaming2 = Server.CreateObject("ADODB.Recordset");
    streaming2.ActiveConnection = MM_vs2_STRING;
    streaming2.Source = "select * from video order by idvideo desc";
    streaming2.CursorType = 0;
    streaming2.CursorLocation = 2;
    streaming2.LockType = 1;
    streaming2.Open();
    var streaming2_numRows = 0;
    %>
    <%
    var Repeat1__numRows = 5;
    var Repeat1__index = 0;
    streaming2_numRows += Repeat1__numRows;
    %>
    <%
    var Repeat1__numRows = 5;
    var Repeat1__index = 0;
    streaming2_numRows += Repeat1__numRows;
    %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="pagina.css" rel="stylesheet" type="text/css">

    </head>

    <body>
    <div align="center">[img]images/logo_giornaleITsmall.jpg[/img]
    </div>
    <table width="90%" border="0" align="center">
    <tr>
    <td><div align="center"><a align="center" class="occhiello"><%=(streaming2.Fields.Item("titolo").Value)%></a>

    </div>
    <table width="307" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td colspan="3">[img]images/tvup.gif[/img]</td>
    </tr>
    <tr>
    <td width="23">[img]images/tvleft.gif[/img]</td>
    <td width="247"><div align="center">
    <embed src="video/video/<%=(streaming2.Fields.Item("filmato").Value)%>" autostart=true width="352" height="330" align="middle" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
    </div></td>
    <td width="23"><div align="right">[img]images/tvright.gif[/img]</div></td>
    </tr>
    <tr>
    <td colspan="3">[img]images/tvdown.gif[/img]</td>
    </tr>
    <tr>
    <td colspan="3" class="notizie"><div align="center">Attendere il caricamento
    del filmato...</div></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td>
    </td>
    </tr>
    </table>

    <table cellpadding="2" cellspacing="0" bordercolor="#111111" style="border-collapse: collapse; border: 1px solid #0071af; padding:0">
    <tr> <% while ((Repeat1__numRows-- != 0) && (!streaming2.EOF)) { %>

    <td width="138" class="txt_notizie"><div align="center"><%=(streaming2.Fields.Item("genere" ).Value)%>

    [img]video/video/<%=(streaming2.Fields.Item([/img]" width="100" height="75" hspace="10" border="1" align="center" /></div></td>
    <%
    Repeat1__index++;
    streaming2.MoveNext();
    }
    %> </tr>

    </table>


    mentre il codice della seconda pagina è:


    <link href="pagina.css" rel="stylesheet" type="text/css">
    </head>

    <body>
    <div align="center">[img]images/logo_giornaleITsmall.jpg[/img]
    </div>
    <table width="90%" border="0" align="center">
    <tr>
    <td><div align="center"><a align="center" class="occhiello"><%=(streaming3.Fields.Item("titolo").Value)%></a>

    </div>
    <table width="307" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td colspan="3">[img]images/tvup.gif[/img]</td>
    </tr>
    <tr>
    <td width="23">[img]images/tvleft.gif[/img]</td>
    <td width="247"><div align="center">
    <embed src="video/video/<%=(streaming3.Fields.Item("filmato").Value)%>" autostart=true width="352" height="330" align="middle" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
    </div></td>
    <td width="23"><div align="right">[img]images/tvright.gif[/img]</div></td>
    </tr>
    <tr>
    <td colspan="3">[img]images/tvdown.gif[/img]</td>
    </tr>
    <tr>
    <td colspan="3" class="notizie"><div align="center">Attendere il caricamento
    del filmato...</div></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td>
    </td>
    </tr>
    </table>

    <p align="center">[img]images/chiudi1.jpg[/img]</p>
    </body>
    </html>
    <%
    streaming3.Close();
    %>



    purtoppo non funziona!
    mi rimanda sempre al primo record in ordine di id !

    help please!!!

  2. #2
    Utente di HTML.it L'avatar di viki1967
    Registrato dal
    Feb 2003
    Messaggi
    1,757
    Devi scorrere il recordset e prevedere un ciclo.
    A S P : tutto il resto è noia...
    L I N U X : forse mi "converto"...

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.