Cool!

Danke

> -----Urspr�ngliche Nachricht-----
> Von: Andreas Roth [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 11. Dezember 2001 15:32
> An: ASP Diskussionsliste fuer Anfaenger
> Betreff: [aspdebeginners] AW: RE: Select Box
>
>
> Guckst du hier:
> http://www.euphoriaschild.darktech.org/index.asp?I=112
> ich hab mir da mal eine Klasse zusammengeschraubt, die sowas fast
> automatisch macht.
>
> Auf der einen Seite sieht das dann zB. so aus: (achte auf die
> Deklaration am
> Anfang und den Pfeil sp�ter:
>
> <!--#include file="../../../include/function/sql.asp"-->
> <!--#include file="../../../include/function/DBOperations.asp"-->
> <%
> If Session("BenutzerID") = "" Then isRedirect = true
> If Session("BerechtigungAdmin") = ""  Then isRedirect = true
> If isRedirect Then
>         Position = "../../../"
>         %><!--#include file="../../../include/JavaScript/logoff.asp"--><%
> End If
> 'isDebug = true
> Set DBOp = new DBOperations
> DBOp.numberOfFields = 3
> DBOp.Construct
> DBOp.Add "ID",0,true,false
> DBOp.Add "SoftwareArtID",0,false,true
> DBOp.Add "Bezeichnung",3,false,true
> DBop.SetLabel "Bezeichnung", "Software"
> %>
> <html>
> <head>
> <title>Software</title>
> <!--#include file="../../../include/JavaScript/Dateselect.asp"-->
> <script language="JavaScript">
> function CheckAuswahl()
> {
>         var isSave = true
>
> if(document.Software.SoftwareArtID[document.Software.SoftwareArtID
> .selectedI
> ndex].value=="-1")
>         {
>                 alert("Bitte w�hlen sie eine SoftwareArt!");
>                 isSave = false;
>         }
>         if(document.Software.Bezeichnung.value=="")
>         {
>                 alert("Tragen Sie bitte eine Software ein!");
>                 isSave = false;
>         }
>         return isSave;
> }
>
> function DerLink()
> {
>
> if(!(document.Software.SoftwareArtID[document.Software.SoftwareArt
> ID.selecte
> dIndex].value=="-1"))
>         {
>
> window.open("../SoftwareArten/SoftwareArtenBearbeiten.asp?ID=" +
> document.Software.SoftwareArtID[document.Software.SoftwareArtID.se
> lectedInde
> x].value,"_self");
>         }
> }
>
> </script>
> </head>
>  <body bgcolor="#CCCCD0" link="#000000" alink="#000000" vlink="#000000">
>  <table width="100%" border="0">
>        <tr height="25">
>                <td width="3%"
> background="../../../Structur/Backgrounds/ueberpunkt.gif">&nbsp;
>                    </td>
>                <td width="97%"
> background="../../../Structur/Backgrounds/ueber.gif"><font
> face="Verdana,Helvetica,Arial"><b>Software</b></font>
>                    </td>
>        </tr>
> </table>
> <table border="0">
> <%
> theID = Request.QueryString("ID")
> IF theID = "-1" then
>        DBop.SetValue "ID", -1
> Else
> SQL = "SELECT * FROM Software WHERE ID = " & theID
>
> ReadDatabase SQL, rs
> If not rs.eof Then DBop.FillIn rs
> Set rs = nothing
> End If
>
>
> %>
> </table>
> <form action="SoftwareSpeichern.asp" method="post" name="Software"
> onSubmit="return CheckAuswahl();">
> <table border="0">
> <%
> DBop.PrintLineRequestForName "ID"
>
> Response.Write("                </td>" & vbCrLf)
> Response.Write("        </tr>" & vbCrLf)
> Response.Write("        <tr>" & vbCrLf)
> Response.Write("                <td>" & vbCrLf)
> Response.Write("<font face=""Verdana,Helvetica,Arial"">SoftwareArt" &
> vbCrLf)
> Response.Write("                </td>" & vbCrLf)
> Response.Write("                <td>" & vbCrLf)
>
>
> SQLSoftwareArt = "SELECT * FROM SoftwareArten ORDER BY Bezeichnung"
> ReadDatabase SQLSoftwareArt, rsSoftwareArt
>
> '-->
> '----------------------------------------------------------------------
> ' Hier wird die Selectbox ausgegeben
> '----------------------------------------------------------------------
>
> DBop.AddSelectBox "SoftwareArtID", rsSoftwareArt, "ID"
> Set rsSoftwareArt = nothing
> Response.Write ("<font face=""Verdana,Helvetica,Arial"">[<a
> href=""javascript:DerLink();"">&auml;ndern</a>]</font>" & vbCrLf)
> Response.Write ("<font face=""Verdana,Helvetica,Arial"">[<a
> href=""../SoftwareArten/SoftwareArtenBearbeiten.asp?ID=-1"">neu
> anlegen</a>]</font>" & vbCrLf)
>
>
>
> DBop.PrintLineRequestForName "Bezeichnung"
>
> Response.Write("                </td>" & vbCrLf)
> Response.Write("        </tr>" & vbCrLf)
>
> %>
> </td>
> </tr>
> </table>
> <input type="submit" Value="Speichern">
> </form>
>
>
> Andreas Roth
> --------------------------------------
> [EMAIL PROTECTED]           *jetzt mit Chat*
> http://www.EuphoriasChild.DarkTech.org
> --------------------------------------
>
>


| Oft Gefragtes: http://www.aspgerman.com/aspgerman/faq/
| [aspdebeginners] als [email protected] subscribed
| http://www.aspgerman.com/archiv/aspdebeginners/ = Listenarchiv
| Sie knnen sich unter folgender URL an- und abmelden:
| http://www.aspgerman.com/aspgerman/listen/anmelden/aspdebeginners.asp

Antwort per Email an