tags:

views:

36

answers:

1
+1  Q: 

CLASSIC ASP QUERY

do until rs1.eof             

elseif year(tDate) = year(now) then

elseif rs1("leavetype") = 1 and (rs1("statusLev1") = "z" and rs1("statusLev2") = "z") then
                    childcare = childcare + rs1("totaldays")

elseif rs1("leavetype") = 28 and (rs1("statusLev1") = "P" and rs1("statusLev2") = "P") then
 %>
<script>alert("You are...")
history.go(-1)</script>
<%** 
    end if

         end if
    rs1.movenext
    loop
    rs1.movefirst   

After submitting leavetype = 28 ,i can't apply any other leave as the message box is showing.I want to show the message box only if i applied for leave type 28 and status level is p.Otherwise i don't need to the message box for leave 1 or 2.How can i modify..? Thanks

+1  A: 

ASP is executed on the server side, the <script>.... is executed on the client site.

What you are looking for is ( I think )

Response.Write("<script>alert(""You are...""); history.go(-1)<script>")

withgout the %> and <%. So writing the javascript code so that it appears in the client side html .

Edelcom