Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems in my code.
Message
De
04/07/2002 12:18:48
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Problems in my code.
Divers
Thread ID:
00675372
Message ID:
00675372
Vues:
44
Hello i have this javascript in a ASP file, and i want to display an alert and confirm what option did the user take, but it always goes through the then not for the else when you choose the other option.
This is my code:
<%@LANGUAGE="VBSCRIPT"%>
<%id=Request.Form ("id2")
response.write id
set conn=server.CreateObject ("ADODB.connection")
set Rs=server.CreateObject ("ADODB.Recordset")
conn.Open ("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\mydatabase\NoticiasyEventos.mdb;UID=admin;PWD=")
%>
 <script language=javascript>
   if (confirm("Are you sure that you want to eliminate the record?"))
     { <%sql="delete from freepress where id="&id
	     set rs=conn.execute (sql) %>;
	   alert("The record was erased");
	   window.top.location.href="http://esalcedo/foros/consultanoticias.asp";
	   }
	 else
	  {history.go (-1) }
 </script>
<%
'sql="delete from freepress where id="&id
'response.write sql

%>
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform