30. marts 2001 - 22:48
Der er
5 kommentarer og 1 løsning
Tagwall
Jeg har en tagwall. Men problemet er at jeg gerne vil have sådan så når man skal skrive : \"Webmasters\" som navn, så popper den et \"Hvad er password\'et\" op i asp\" og så skal man skrive password\'et, og derefter klikker man ok. Og så kan man skrive som Webmasters og webmaster. koden er : <% Response.Buffer = \"True\" %> <% mode = request(\"mode\")%> <head> <title>My TagWall</title> <style> <!-- a:link {color:#000000; text-decoration:none} a:visited {color:#000000; text-decoration:none} a:hover {color:#000000; text-decoration:underline} --> </style> </head> <% if mode = \"write\" then nickname = Trim(Request.Form(\"nickname\")) message = Trim(Request.Form(\"message\")) if nickname = \"\" then error = \"[ You have to write a name ]\" end if if message = \"\" then error = \"[ You have to write a tag ]\" end if if not write = \"nej\" then if message = \"\" then else write = \"yes\" end if end if if write = \"yes\" then Const adOpenKeyset = 1 Const adLockOptimistic = 3 Set Conn = Server.CreateObject(\"ADODB.Connection\") Conn.Open \"PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"access.mdb\") & \";UID=;PWD=;\" Set rs = Server.CreateObject(\"ADODB.RecordSet\") strSQL = \"Select * From messages\" rs.Open strSQL, Conn, adOpenKeyset, adLockOptimistic rs.AddNew rs(\"nickname\") = Request.form(\"nickname\") rs(\"message\") = Request.form(\"message\") rs(\"fontcolor\") = Request.form(\"fontcolor\") rs(\"fontface\") = Request.form(\"fontface\") rs(\"ip\") = request.servervariables(\"remote_Addr\") rs(\"time\") = time rs.Update rs.Close Set rs = Nothing Conn.Close set Conn = Nothing Response.Redirect(\"default.asp\") end if end if %> <body bgcolor=\"#9CA8B4\"> <div align=\"center\"> <center> <table border=\"0\" width=\"7\" cellspacing=\"1\" style=\"background-color: #000000\" height=\"375\" cellpadding=\"0\"> </center> <center> <tr> <td width=\"150\" bgcolor=\"#C0C0C0\" valign=\"top\" height=\"373\" backbround=\"bg.jpg\"> <td width=\"605\" bgcolor=\"#C0C0C0\" valign=\"top\" height=\"373\" background=\"bg.jpg\"> <table border=\"0\" width=\"595\" cellspacing=\"0\" cellpadding=\"0\" height=\"57\"> <tr> <td width=\"1\" height=\"42\" valign=\"top\" rowspan=\"3\"></td> <td width=\"484\" height=\"220\" valign=\"top\"> <table border=\"0\" width=\"123%\" cellspacing=\"0\"> <tr> <td width=\"100%\" style=\"border-style: solid; border-width: 1\" bordercolor=\"#000000\" bgcolor=\"#9CA8B4\"><font size=\"1\" face=\"Verdana\"><b>..:. </b>Gæstebog</font></td> </tr> <form action=\"default.asp?mode=write\" method=\"POST\" onsubmit=\"return FrontPage_Form1_Validator(this)\" name=\"FrontPage_Form1\"> <tr> <td width=\"100%\" style=\"border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1\" bordercolor=\"#000000\"><table border=\"0\" cellspacing=\"0\" width=\"100%\" height=\"1\" cellpadding=\"0\"> <tr> <td width=\"100%\" height=\"1\" bordercolor=\"#FFFFFF\"> <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" height=\"85\" bg color=\"919191\"> <tr> <td width=\"426\" height=\"18\" colspan=\"2\"> <p align=\"left\"></p> </td> </tr> <center> <tr> <td width=\"80\" height=\"25\"> <p align=\"center\"><font face=\"Verdana\" size=\"1\" color=\"#000000\">NickName:</font></td> <td width=\"371\" height=\"25\"><font face=\"Verdana\" size=\"2\" color=\"#000000\"><INPUT TYPE=\"text\" NAME=\"nickname\" class=\"css\" size=\"16\" style=\"background : \"bg.jpg\" ; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000\" maxlength=\"30\"></font></td> </tr> <tr> <td width=\"80\" height=\"25\"> <p align=\"center\"><font face=\"Verdana\" size=\"1\" color=\"#000000\">Message:</font></td> <td width=\"371\" height=\"25\" bgcolor=\"#C0C0C0\"><font face=\"Verdana\" size=\"2\" color=\"#000000\"> <INPUT TYPE=\"text\" NAME=\"message\" class=\"css\" size=\"59\" style=\"background : \"bg.jpg\" ; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000\" maxlength=\"250\"></font></td> </tr> <tr> <td width=\"80\" height=\"27\"> <p align=\"center\"><font face=\"Verdana\" size=\"1\" color=\"#000000\">Color, Font:</font></td> <td width=\"371\" height=\"27\"> <table border=\"0\" width=\"106%\" cellspacing=\"0\" cellpadding=\"0\" height=\"25\"> <tr> <td width=\"100%\" align=\"left\" height=\"25\"> <p align=\"left\"><font face=\"Verdana\" size=\"1\" color=\"#000000\"><select name=\"fontcolor\" style=\"font-size: 8 pt; color: #000000; font-family: Verdana; background-color: #9CA8B4; border: 1px solid #000000\" tabIndex=\"4\" size=\"1\"> <option value=\"000000\">Choose a Color</option> <option value=\"000000\">Black</option> <option value=\"808080\">Grey</option> <option value=\"0000ff\">Blue</option> <option value=\"FFcc00\">Yellow</option> <option value=\"ff0000\">Red</option> <option value=\"00FF00\">Light Green</option> <option value=\"green\">Dark Green</option> <option value=\"FF00FF\">Pink</option> <option value=\"800080\">Purple</option> </select><select name=\"fontface\" style=\"font-size: 8 pt; color: #000000; font-family: Verdana; background-color: #9CA8B4; border: 1px solid #000000\" tabIndex=\"4\" size=\"1\"> <option value=\"verdana\">Choose a Font</option> <option value=\"verdana\">Verdana</option> <option value=\"tahoma\">Tahoma</option> <option value=\"arial\">Arial</option> <option value=\"comic sans ms\">Comic Sans MS</option> </select></font></td> </tr> </table> </td> </tr> </center> </table> <table border=\"0\" width=\"696\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"123\" bgcolor=\"#C0C0C0\"> <p align=\"center\"></td> <td width=\"563\" bgcolor=\"#919191\"> <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"100%\" align=\"left\"> <font face=\"Verdana\" font size=\"2\" color=\"#EEEEEE\"><b> <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td bgcolor=\"#C0C0C0\"> <font face=\"Verdana\" font size=\"2\" color=\"#000000\"><b><input type=\"submit\" name=\"submit\" value=\"Write\" class=\"css\" style=\"background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000\"><input type=\"submit\" name=\"Opdater\" class=\"css\" style=\"background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000\" value=\"Reload\"></b></font></form></td> </tr> </table> </b></font></td> </tr> </table> </td> <td width=\"4\" bgcolor=\"#C0C0C0\"> <p align=\"center\"></td> </tr> </table> </td> </tr> </table> <% strDSN = \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\"&Server.MapPath(\"access.mdb\") Set myConn = Server.CreateObject(\"ADODB.Connection\") myConn.Open strDSN strSQL = \"SELECT COUNT(id) AS Antal FROM messages\" Set CountRs = myConn.execute(strSQL) SQL = \"SELECT * FROM messages order by id desc\" Set Rs = myConn.Execute(SQL) %> <div align=\"center\"> <center><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" height=\"1\"> <tr><td style=\"border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1\" bordercolor=\"#000000\" bgcolor=\"#808080\" height=\"1\"><p align=\"center\"><font face=\"Verdana\" size=\"1\" color=\"#EEEEEE\">Der er <% response.write CountRs(\"Antal\") %> besked(er) i gæstebogen..</font></td></tr></table> </center> </div> <% do while not Rs.eof %> <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"100%\" bordercolor=\"#FFFFFF\"> <div align=\"center\"> <center> <table border=\"0\" width=\"100%\" cellspacing=\"0\"> <tr> <td width=\"100%\" bordercolor=\"#000000\" bgcolor=\"#EEEEEE\"><font face=\"verdana\" size=\"1\" color=\"#000000\"><b><%=server.HTMLencode(rs(\"nickname\"))%> : </b><font face=\"<%=rs(\"fontface\")%>\" size=\"1\" color=\"<%=rs(\"fontcolor\")%>\"> <%=server.HTMLencode(rs(\"message\"))%></font></font></td> </tr> <% rs.MoveNext Loop myConn.Close Set myConn = Nothing %> </table> </center> </div> </td> </tr> </table> </table> </center>
Annonceindlæg fra Infor
31. marts 2001 - 13:22
#1
Ups..UNDSKYLD.. koden er :
31. marts 2001 - 13:34
#2
<% Response.Buffer = \"True\" %> <% mode = request(\"mode\")%> <head> <title>Gæstebog</title> <style> <!-- a:link {color:#000000; text-decoration:none} a:visited {color:#000000; text-decoration:none} a:hover {color:#000000; text-decoration:underline} --> </style> </head> <% if mode = \"write\" then nickname = Trim(Request.Form(\"nickname\")) message = Trim(Request.Form(\"message\")) if nickname = \"\" then error = \"[ You have to write a name ]\" end if if message = \"\" then error = \"[ You have to write a tag ]\" end if if not write = \"nej\" then if message = \"\" then else write = \"yes\" end if end if if write = \"yes\" then Const adOpenKeyset = 1 Const adLockOptimistic = 3 Set Conn = Server.CreateObject(\"ADODB.Connection\") Conn.Open \"PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"access.mdb\") & \";UID=;PWD=;\" Set rs = Server.CreateObject(\"ADODB.RecordSet\") strSQL = \"Select * From messages\" rs.Open strSQL, Conn, adOpenKeyset, adLockOptimistic rs.AddNew rs(\"nickname\") = Request.form(\"nickname\") rs(\"message\") = Request.form(\"message\") rs(\"fontcolor\") = Request.form(\"fontcolor\") rs(\"fontface\") = Request.form(\"fontface\") rs(\"ip\") = request.servervariables(\"remote_Addr\") rs(\"time\") = time rs.Update rs.Close Set rs = Nothing Conn.Close set Conn = Nothing Response.Redirect(\"default.asp\") end if end if %> <body bgcolor=\"#9CA8B4\"> <div align=\"center\"> <center> <table border=\"0\" width=\"700\" cellspacing=\"0\" bgcolor=\"#919191\" cellpadding=\"0\"> <tr> <td width=\"100%\" style=\"border-style: solid; border-width: 1\" bordercolor=\"#000000\" bgcolor=\"#808080\"> <p align=\"center\"><font size=\"1\" face=\"Verdana\" color=\"#EEEEEE\"><b>Gæstebog</b></font></p> </td> </tr> <form action=\"default.asp?mode=write\" method=\"POST\" onsubmit=\"return FrontPage_Form1_Validator(this)\" name=\"FrontPage_Form1\"> <tr> <td width=\"100%\" style=\"border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1\" bordercolor=\"#000000\"><table border=\"0\" cellspacing=\"0\" width=\"100%\" height=\"1\" cellpadding=\"0\"> <tr> <td width=\"100%\" height=\"1\" bordercolor=\"#000000\"> <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" height=\"85\" bgcolor=\"#919191\"> <tr> <td width=\"426\" height=\"18\" colspan=\"2\"> <p align=\"left\"></p> </td> </tr> <center> <tr> <td width=\"80\" height=\"25\"> <p align=\"center\"><font face=\"Verdana\" size=\"1\" color=\"#000000\">Nickname:</font></td> <td width=\"371\" height=\"25\"><font face=\"Verdana\" size=\"2\" color=\"#000000\"><INPUT TYPE=\"text\" NAME=\"nickname\" class=\"css\" size=\"16\" style=\"background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000\" maxlength=\"30\"></font></td> </tr> <tr> <td width=\"80\" height=\"25\"> <p align=\"center\"><font face=\"Verdana\" size=\"1\" color=\"#000000\">Besked:</font></td> <td width=\"371\" height=\"25\"><font face=\"Verdana\" size=\"2\" color=\"#000000\"> <INPUT TYPE=\"text\" NAME=\"message\" class=\"css\" size=\"59\" style=\"background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000\" maxlength=\"250\"></font></td> </tr> <tr> <td width=\"80\" height=\"27\"> <p align=\"center\"><font face=\"Verdana\" size=\"1\" color=\"#000000\">Color, Font:</font></td> <td width=\"371\" height=\"27\"> <table border=\"0\" width=\"106%\" cellspacing=\"0\" cellpadding=\"0\" height=\"25\"> <tr> <td width=\"100%\" align=\"left\" height=\"25\"> <p align=\"left\"><font face=\"Verdana\" size=\"1\" color=\"#000000\"><select name=\"fontcolor\" style=\"font-size: 8 pt; color: #000000; font-family: Verdana; background-color: #9CA8B4; border: 1px solid #000000\" tabIndex=\"4\" size=\"1\"> <option value=\"000000\">Sort </option> <option value=\"FFFFFF\">Hvid </option> <option value=\"0000FF\">Blå </option> <option value=\"0099ff\">Lyse blå</option> <option value=\"FF0000\">Rød </option> <option value=\"00FF00\">Grøn </option> <option value=\"FF00FF\">Lilla </option> <option value=\"008800\">Mørk grøn </option> <option value=\"000088\">Mørk blå </option> <option value=\"880000\">Mørk rød </option> <option value=\"008888\">Mørk turkis </option> <option value=\"880088\">Mørk lilla </option> <option value=\"8A2BE2\">Blåviolet </option> <option value=\"D2691E\">Brun </option> <option value=\"FFFF00\">Gul </option> <option value=\"FFD700\">Guld </option> <option value=\"FF8C00\">Mørk orange </option> <option value=\"808000\">Oliven </option> <option value=\"FFA500\">Orange </option> <option value=\"00BFFF\">Skyblå </option> <option value=\"00FF7F\">Sommergrøn </option> <option value=\"EE82EE\">Violet </option> </select><select name=\"fontface\" style=\"font-size: 8 pt; color: #000000; font-family: Verdana; background-color: #9CA8B4; border: 1px solid #000000\" tabIndex=\"4\" size=\"1\"> <option value=\"Verdena\">Normal </option> <option value=\"Arial\">Arial </option> <option value=\"Arial Black\">Arial Black </option> <option value=\"Arial Narrow\">Arial Narrow </option> <option value=\"Book Antiqua\">Book Antiqua </option> <option value=\"Bookman Old Style\">Bookman Old Style </option> <option value=\"Century Gothic\">Century Gothic </option> <option value=\"Comic Sans MS\">Comic Sans MS </option> <option value=\"Courier\">Courier </option> <option value=\"Courier New\">Courier New </option> <option value=\"DigitMed\">DigitMed </option> <option value=\"DigitSmall\">DigitSmall </option> <option value=\"Fixedsys\">Fixedsys </option> <option value=\"Garamond\">Garamond </option> </select></font></td> </tr> </table> </td> </tr> </center> </table> <table border=\"0\" width=\"696\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"123\" bgcolor=\"#919191\"> <p align=\"center\"></td> <td width=\"563\" bgcolor=\"#919191\"> <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"100%\" align=\"left\"> <font face=\"Verdana\" font size=\"2\" color=\"#EEEEEE\"><b> <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td> <font face=\"Verdana\" font size=\"2\" color=\"#EEEEEE\"><b><input type=\"submit\" name=\"submit\" value=\"Skriv...\" class=\"css\" style=\"background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000\"><input type=\"submit\" name=\"Opdater\" class=\"css\" style=\"background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000\" value=\"Opdater...\"></b></font></form></td> </tr> </table> </b></font></td> </tr> </table> </td> <td width=\"4\" bgcolor=\"#919191\"> <p align=\"center\"></td> </tr> </table> </td> </tr> </table> <% strDSN = \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\"&Server.MapPath(\"access.mdb\") Set myConn = Server.CreateObject(\"ADODB.Connection\") myConn.Open strDSN strSQL = \"SELECT COUNT(id) AS Antal FROM messages\" Set CountRs = myConn.execute(strSQL) SQL = \"SELECT * FROM messages order by id desc\" Set Rs = myConn.Execute(SQL) %> <div align=\"center\"> <center><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" height=\"1\"> <tr><td style=\"border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1\" bordercolor=\"#000000\" bgcolor=\"#808080\" height=\"1\"><p align=\"center\"><font face=\"Verdana\" size=\"1\" color=\"#EEEEEE\">Der er <% response.write CountRs(\"Antal\") %> besked(er) i gæstebogen</font></td></tr></table> </center> </div> <% do while not Rs.eof %> <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"100%\" bordercolor=\"#000000\"> <div align=\"center\"> <center> <table border=\"0\" width=\"100%\" cellspacing=\"0\"> <tr> <td width=\"100%\" bordercolor=\"#000000\" bgcolor=\"#EEEEEE\"><font face=\"verdana\" size=\"1\" color=\"#000000\"><b><%=server.HTMLencode(rs(\"nickname\"))%>:</b><font face=\"<%=rs(\"fontface\")%>\" size=\"1\" color=\"<%=rs(\"fontcolor\")%>\"> <%=server.HTMLencode(rs(\"message\"))%></font></font></td> </tr> <% rs.MoveNext Loop myConn.Close Set myConn = Nothing %> <tr> <td width=\"100%\" bordercolor=\"#000000\" bgcolor=\"#808080\" style=\"border-top-style: solid; border-top-width: 1\"> <p align=\"center\"><b><font face=\"Verdana\" size=\"1\" color=\"#FF0000\">OPS !! </font><font face=\"Verdana\" size=\"1\" color=\"#EEEEEE\">Hvis du skriver mere end 49tegn, kommer der en fejl !</font></b></td> </tr> </table> </center> </div> </td> </tr> </table> </table> </center> </div>
31. marts 2001 - 13:35
#3
Nogle som der vil hjælpe mig?
31. marts 2001 - 14:04
#4
Nå ikke !
31. marts 2001 - 14:06
#5
Eller hva? Kom nu. Jeg har brug for det nu !
31. marts 2001 - 16:20
#6
Nå... Ingen gider at hjælpe.. Hvor er i venlige !!!!!! *GrR* *GG*
Kurser inden for grundlæggende programmering