Mindre ASP problem med to links der vil det samme!
Jeg har en ASP side, hvor man kan sige "OK" for at gemme ændringerne i formen, man kan rette Sideindholdet og man kan slette siden!Problemet er at "OK" linket peger faktisk samme sted hen som "SLET" linket, men det er kun "OK" linket der virker!
Koden ser sådan her ud:
<html>
<head>
<title>Guestbook Form</title>
</head>
<style fprolloverstyle>A:hover {color: #FF0000; font-family: Arial; font-size: 8pt}
minsubmit{border: 0px #FFFFFF solid;background: #FFFFFF;cursor: hand;font: Arial;}
a {text-decoration: none;}
</style>
<body bgcolor="white" text="black" bgproperties="fixed" background="pix/background.gif">
<%
If Session("login") <> "JA" Then
Response.Redirect "nologin.asp"
End If
Dim ADO_Connection
Dim rsEdit
Dim SQL_STRING
set ADO_Connection = server.Createobject("ADODB.Connection")
ADO_Connection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../../cgi-data/db.mdb")
set rsEdit= server.Createobject("ADODB.Recordset")
SQL_STRING= "SELECT * FROM page WHERE ID=" & Request.QueryString("ID")
rsEdit.open SQL_String, ADO_Connection
%>
<br>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="50%" id="AutoNumber1">
<tr>
<td>
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td bgcolor="#006699"><font face='Arial' color="#FFFFFF"><b>Rediger side:</b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="2"><font face="Arial">Udfyld alle felterne nedenunder:<b><br></b></font><br>
<%
STRING_Indhold = "<a href='texteditor/editor.asp?id=" & rsEdit("Id") & "'>" & "Ret siden" & "</a>"
STRING_Delete = "<a href=""#"" onclick=""if(confirm('Er du sikker på at du slette siden??')) self.location.href = 'menu_deleted.asp?id=" & rsEdit("Id") & "'>" & "Slet siden" & "</a>"
%>
<form method="POST" NAME="myForm" action="menu_edited.asp">
<table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="47%"><font face="Arial" size="2">Navn på siden:</font></td>
<td width="27%"><font size="2" face="Arial">
<input type="text" name="name" size="20" value="<%response.Write rsEdit("name")%>"></font></td>
<td width="26%"> </td>
</tr>
<tr>
<td width="47%"><font face="Arial" size="2">Overskrift:</font></td>
<td width="27%"><font size="2" face="Arial">
<input type="text" name="headline" size="20" value="<%response.Write rsEdit("headline")%>"></font></td>
<td width="26%"> </td>
</tr>
<tr>
<td width="47%"><font face="Arial" size="2">Rod ID:</font></td>
<td width="27%"><font face="Arial">
<input type="text" name="rodID" size="2" value="<%response.Write rsEdit("ParentID")%>"><font size="2"> 0 = Hovedpunkt</font></font></td>
<td width="26%"> </td>
</tr>
<tr>
<td width="47%"><font face="Arial" size="2">Rank Nummer:</font></td>
<td width="27%"><font size="2" face="Arial">
<input type="text" name="rank" size="2" value="<%response.Write rsEdit("rank")%>"></font></td>
<td width="26%"> </td>
</tr>
<tr>
<td width="47%"><font face="Arial" size="2">Om siden skal ses i menuen:</font></td>
<td width="27%"><font face="Arial">
<%
If rsEdit("show") = "ON" then
response.write ("<input type='checkbox' name='show' value='1'></font></td>")
else
response.write ("<input type='checkbox' name='show' value='0'></font></td>")
end if
%>
<td width="26%"> </td>
</tr>
<tr>
<td width="100%" colspan="3"> </td>
</tr>
</table>
<font face="Arial">Efter at have udfyldt felterne klik ok.<br>
</font><br>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr>
<td width="33%">
<p align="center"><INPUT TYPE="HIDDEN" NAME="NAME1" VALUE="value1"><A HREF="#" onClick="document.myForm.submit();return false">Ok</A></span></td>
<td width="33%"><%response.write STRING_indhold%></td>
<td width="34%"><%response.write STRING_Delete%></td>
</tr>
</table>
</p>
</form>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
rsEdit.close
Set reEdit = Nothing
%>
</body>
</html>
Nogen der vil hjælpe????