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

    Pop up per Galleria Fotografica in ASP

    Ragazzi sono principiante di ASP, vorrei sapere da voi come fare a fare aprire una pop up da questo script di galleria fotografica... Mi spieghereste come fare? Grazie!


    <%@ language = "VBSCRIPT" %>


    <%
    Dim iPageSize 'How big our pages are
    Dim iPageCount 'The number of pages we get back
    Dim iPageCurrent 'The page we want to show
    Dim strOrderBy 'A fake parameter used to illustrate passing them
    Dim SQL 'SQL command to execute
    Dim iRecordsShown 'Loop controller for displaying just iPageSize records
    Dim I 'Standard looping var
    %>

    <html>
    <head>
    <title>Fotogallery</title>
    <meta http-equiv="Content-Type" content="text/html; chaObjRecet=iso-8859-1">
    </head>

    <body bgcolor="#FFFFFF" text="#000000">
    <% smallF = "<Font face=""arial"" size=""1"" color=""#000000"">"
    BlackF = "<Font face=""arial"" size=""4"" color=""#000000"">[b]"
    NormalF = "<Font face=""arial"" size=""2"" >"
    iPageSize =8 'number of images shown on each page



    ' Retrieve page to show or default to 1
    If Request.QueryString("page") = "" Then
    iPageCurrent = 1
    Else
    iPageCurrent = CInt(Request.QueryString("page"))

    End If

    If Request.QueryString("order") = "" Then
    strOrderBy = "id"
    Else
    strOrderBy = Request.QueryString("order")

    End If

    Response.write ""& BlackF &"<p align=center>Photogallery

    "




    SQL = "SELECT * FROM gallery ORDER BY " & strOrderBy & " DESC ;"

    Set objCon = Server.CreateObject ("ADODB.Connection")
    objcon.Open dbcon
    Set objRec = Server.CreateObject ("ADODB.Recordset")



    Objrec.PageSize = iPageSize
    objrec.CacheSize = iPageSize

    objRec.Open SQL, objcon, adOpenStatic, adLockReadOnly, adCmdText

    iPageCount = objrec.PageCount
    iPageCount = objrec.PageCount

    If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
    If iPageCurrent < 1 Then iPageCurrent = 1

    ' Check page count to prevent bombing when zero results are returned!
    If iPageCount = 0 Then
    Response.Write "No records found!"

    Else
    ' Move to the selected page
    objrec.AbsolutePage = iPageCurrent

    Response.Write "" & normalF & "Sono presenti " & objRec.RecordCount & " foto nella fotogallery"


    end if
    %>

    <table width="50%" border="0" bordercolor="#000000" cellspacing="0" cellpadding="0" height="40" align=center>

    <tr>
    <%
    iRecordsShown = 0
    Do While iRecordsShown < iPageSize And Not objrec.EOF


    If NOT ObjRec.BOF Then
    Response.write ""&showimage&""
    imagenr = imagenr + 1
    iRecordsShown = iRecordsShown + 1

    objRec.MoveNext


    end if

    loop

    ObjRec.close
    set Objrec = Nothing

    function showimage()
    dim HTML
    html = ""
    if imagenr = 4 then 'change this if you want more than 4 images in a row
    html = "<tr></tr>"
    imagenr = 0
    end if


    html = html & "<td valign=""top"" height=""67"" width=""25%"" border=1>"& SmallF & "
    "
    html = html & "<p align=center><a href=dispimage.asp?id=" & ObjRec("ID") & ">[img] & ObjRec([/img]</a>
    "
    html = html & " Ingrandisci
    </td>"

    showimage = html

    end function
    %>


    </tr>
    </table>

    <%
    Response.write "
    "& SmallF& ""

    If iPageCurrent > 1 Then
    %>
    <font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="./default.asp?page=<%= iPageCurrent - 1 %>&order=<%= Server.URLEncode(strOrderBy) %>">[&lt;&lt;
    Prev]</a></font>

    <%
    End If

    'Showing PageNumbers
    For I = 1 To iPageCount
    If I = iPageCurrent Then
    %>
    <%= I %>
    <%
    Else
    %>
    <%= I %>
    <%
    End If
    Next 'I

    If iPageCurrent < iPageCount Then
    %>
    <a href="./default.asp?page=<%= iPageCurrent + 1 %>&order=<%= Server.URLEncode(strOrderBy) %>"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">[Next
    &gt;&gt;]
    </font></a>
    <%
    End If

    Response.write "


    "& SmallF& " "& infcop &""
    %>

    </body>
    </html>

  2. #2
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    come ripetuto tante volte conviene postare l' html risultante di una pagina-tipo,
    quello potrebbe essere arabo per forumisti cmq avvezzi a risolvere problematiche lato client

  3. #3
    Scusami, non sapevo. Forse intendi dire questo:

    <html>
    <head>
    <title>Fotogallery</title>
    <meta http-equiv="Content-Type" content="text/html; chaObjRecet=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <Font face="arial" size="4" color="#000000">[b]<p align=center>Photogallery

    <Font face="arial" size="2" >Sono presenti 8 foto nella fotogallery
    <table width="50%" border="0" bordercolor="#000000" cellspacing="0" cellpadding="0" height="40" align=center>
    <tr>
    <td valign="top" height="67" width="25%" border=1><Font face="arial" size="1" color="#000000">
    <p align=center>
    Ingrandisci

    </td><td valign="top" height="67" width="25%" border=1><Font face="arial" size="1" color="#000000">
    <p align=center>
    Ingrandisci

    </td><td valign="top" height="67" width="25%" border=1><Font face="arial" size="1" color="#000000">
    <p align=center>
    Ingrandisci

    </td><td valign="top" height="67" width="25%" border=1><Font face="arial" size="1" color="#000000">
    <p align=center>
    Ingrandisci

    </td><tr></tr><td valign="top" height="67" width="25%" border=1><Font face="arial" size="1" color="#000000">
    <p align=center>
    Ingrandisci
    </td><td valign="top" height="67" width="25%" border=1><Font face="arial" size="1" color="#000000">
    <p align=center>
    Ingrandisci

    </td><td valign="top" height="67" width="25%" border=1><Font face="arial" size="1" color="#000000">
    <p align=center>
    Ingrandisci

    </td><td valign="top" height="67" width="25%" border=1><Font face="arial" size="1" color="#000000">
    <p align=center>
    Ingrandisci

    </td>
    </tr>
    </table>

    <Font face="arial" size="1" color="#000000">1


    <Font face="arial" size="1" color="#000000">

    </body>
    </html>

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.