Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems in my code.
Message
From
04/07/2002 12:18:48
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Problems in my code.
Miscellaneous
Thread ID:
00675372
Message ID:
00675372
Views:
45
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

%>
Next
Reply
Map
View

Click here to load this message in the networking platform