Posts: 1540 From: New Milford CT USA Status: offline
A CAVEMAN should have been able to do this! - 4/13/2007 10:43:33
Hi all....
I have been going nuts with this simple little script. I want to stick a javascript confirm message within an ASP script. Problem is, unless I place a Response.end tag after the JS message, the JS message never appears. Does anyone know how to have the message appear, then click the OK button to continue the script and redirect? Thanks!
<!--#include virtual="/robilia/login/login.inc"-->
<%If len(Request.Form("Comment"))< 1 then%>
<script language="Javascript">
<!--
confirm ("Please enter at least 1 word")
//-->
</script>
<%
Response.redirect "results_item.asp?UN="&Request.Form("UsernameCall")&"&LID="&Request.Form("LID")&"&CX=Y"
End if
%>
RE: A CAVEMAN should have been able to do this! - 4/16/2007 23:53:16
You shouldnt be mixing server and client side script in that way? This assumes that the form has been submitted. I would consider handling the error serverside rather than js (eg in case the user doesnt have it enabled)
_____________________________
If you arent part of the solution, then there is good money to be made prolonging the problem