Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 12
  1. #1

    Aiuto..devo fare un form.....

    Scusate se sono poco pratico di asp....mi sono appena lanciato in questo codice!

    Ho creato un Form e dentro ho inserito un record e vorrei che per ogni risultato scelto mi vada ad una pagina diversa...

    Es.
    dentro la scelta ho: Back, Led zeppelin, Beatles
    Selezionado Back mi deve andare alla pagina relativa newsClassica.asp

    Led Zeppelin a News Rock.asp

    Come posso Fare

    Grazie a tutti per il vostro eventuale aiuto!

  2. #2
    Utente bannato
    Registrato dal
    Oct 2003
    Messaggi
    372

    Re: Aiuto..devo fare un form.....

    Un form? :master:

    scusa, posti il codice che hai?

  3. #3
    Questo è il mio codice...

    Il mio reale problema è che devo creare una sorta di giornalino.ossia delle pagine che abbiano i loro articoli con dei riferimenti:
    Es: se nel form scelgo bach,lui mi deve andare agli articoli che parlano di Bach,
    Se seleziono Led Zeppelin, lui mi dovrà andare nella pagina che tratta gli articoli su i Led Zeppelin
    Calcolando che questi articoli sono in formato .doc



    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

    <%
    ' *** Restrict Access To Page: Grant or deny access to this page
    MM_authorizedUsers="utente,amministratore"
    MM_authFailedURL="errataLogin.asp"
    MM_grantAccess=false
    If Session("MM_Username") <> "" Then
    If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
    (InStr(1,MM_authorizedUsers,Session("MM_UserAuthor ization"))>=1) Then
    MM_grantAccess = true
    End If
    End If
    If Not MM_grantAccess Then
    MM_qsChar = "?"
    If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
    MM_referrer = Request.ServerVariables("URL")
    if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
    MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
    Response.Redirect(MM_authFailedURL)
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_numRows

    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Recordset1.ActiveConnection = MM_MusicConn_STRING
    Recordset1.Source = "SELECT * FROM Articoli"
    Recordset1.CursorType = 0
    Recordset1.CursorLocation = 2
    Recordset1.LockType = 1
    Recordset1.Open()

    Recordset1_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index

    Repeat1__numRows = -1
    Repeat1__index = 0
    Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
    %>
    <%
    Dim MM_paramName
    %>
    <%
    ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

    Dim MM_keepNone
    Dim MM_keepURL
    Dim MM_keepForm
    Dim MM_keepBoth

    Dim MM_removeList
    Dim MM_item
    Dim MM_nextItem

    ' create the list of parameters which should not be maintained
    MM_removeList = "&index="
    If (MM_paramName <> "") Then
    MM_removeList = MM_removeList & "&" & MM_paramName & "="
    End If

    MM_keepURL=""
    MM_keepForm=""
    MM_keepBoth=""
    MM_keepNone=""

    ' add the URL parameters to the MM_keepURL string
    For Each MM_item In Request.QueryString
    MM_nextItem = "&" & MM_item & "="
    If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
    End If
    Next

    ' add the Form variables to the MM_keepForm string
    For Each MM_item In Request.Form
    MM_nextItem = "&" & MM_item & "="
    If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
    End If
    Next

    ' create the Form + URL string and remove the intial '&' from each of the strings
    MM_keepBoth = MM_keepURL & MM_keepForm
    If (MM_keepBoth <> "") Then
    MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
    End If
    If (MM_keepURL <> "") Then
    MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
    End If
    If (MM_keepForm <> "") Then
    MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
    End If

    ' a utility function used for adding additional parameters to these strings
    Function MM_joinChar(firstItem)
    If (firstItem <> "") Then
    MM_joinChar = "&"
    Else
    MM_joinChar = ""
    End If
    End Function
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="foglio.css" rel="stylesheet" type="text/css">
    <script language="JavaScript" type="text/JavaScript">
    <!--


    function MM_jumpMenu(targ,selObj,restore){ //v3.0
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
    }
    //-->
    </script>
    </head>

    <body bgcolor="#FF9900">
    <div align="center">
    <table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td colspan="2">[img]img/nuovotitolo.jpg[/img]</td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td colspan="2"><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="50">
    <param name="movie" value="menu.swf">
    <param name="quality" value="high">
    <embed src="menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="50"></embed></object></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr align="center" valign="middle">
    <td colspan="2"><form action="" method="post" name="FrmGenere" id="FrmGenere">
    <select name="MenGenere" id="MenGenere" onChange="MM_jumpMenu('parent',this,0)">
    <option selected>---------Scegli il Genere---------</option>
    <option value="newsjazz2.asp">Jazz</option>
    <option value="newsclassica2.asp">Classica</option>
    <option value="newsrock2.asp">Rock</option>
    </select>
    </form></td>
    </tr>
    <tr>
    <td colspan="2"><div align="center"> </div></td>
    </tr>
    <tr>
    <td colspan="2"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td><div align="center"><font color="#FF0000"><font color="#0033FF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Vuoi
    essere aggiornato sulla tua musica preferita?Cerca l'artista che
    pi&ugrave; ti piace!!</font>
    </font></div></td>
    </tr>
    </table></td>
    </tr>
    <%
    While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
    %>
    <tr>
    <td width="384" align="center" valign="middle">"><%=(Recordset1.Fields.Item("Cognome").Value) %></td>
    <td width="366" align="center" valign="top"></td>
    </tr>
    <%
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    Recordset1.MoveNext()
    Wend
    %>

    <tr>
    <td colspan="2"><div align="center"></div></td>
    </tr>
    <tr>
    <td colspan="2" align="center" valign="top"></td>
    </tr>
    <tr>
    <td colspan="2" align="center" valign="top"></td>
    </tr>
    <tr>
    <td colspan="2" align="center" valign="top">[img]img/notechesimouvono.gif[/img]</td>
    </tr>
    <tr>
    <td colspan="2" align="center" valign="top"></td>
    </tr>
    <tr>
    <td colspan="2" align="center" valign="top"></td>
    </tr>
    <tr>
    <td colspan="2" align="center" valign="top">[img]img/NOTE.JPG[/img]</td>
    </tr>
    </table>
    </div>
    </body>
    </html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

  4. #4
    MM_ma MM_che MM_codice MM_asp

  5. #5
    Cosa vuoi dire?

  6. #6
    Originariamente inviato da hamleto74
    Cosa vuoi dire?
    MM_niente. MM_mi MM_piace MM_il MM_codice MM_prodotto MM_da MM_Macromedia MM_

  7. #7
    Lo so non è il massimo, ma sto cercando di imparare ASP
    Almeno qui vedo il Prewiew e capisco i miei errori!

  8. #8
    Utente di HTML.it L'avatar di Corwin
    Registrato dal
    Jan 2002
    Messaggi
    584
    Originariamente inviato da hamleto74
    Lo so non è il massimo, ma sto cercando di imparare ASP
    Beh, allora non usare Dreamweaver...
    I don't wanna have to shout it out / I don't want my hair to fall out
    I don't wanna be filled with doubt / I don't wanna be a good boy scout
    I don't wanna have to learn to count / I don't wanna have the biggest amount
    I don't wanna grow up

  9. #9
    Cosa posso fare per imparare ad usarlo....senza Dreamweaver.
    Scriverlo a mano non sono ancora capace, calcolando che mi hanno portato ad usare dreamweaver...nei due mesi di corso asp alla regione....Forse inutile!!!!....ditemi come posso avvicinarmi al codice senza usare dream!?

  10. #10
    Libri.
    Apogeo - Asp 3.0 Guida Completa.

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.