[thelist] sending pop-up to client within asp

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Mon Mar 7 07:17:53 CST 2005


   Wait, never mind; I just noticed the response.end there.  Once you call that, the page stops loading and nothing else will process at all!  If you really want to use Response.End, put it *after* the code that renders the redirect.

Cheers,

Peter

 From: Brian Delaney brian.delaney at mccmh.net

I check the password using ASP.

If the password will expire in 15 days or less I just want to notify the 
user with a pop-up and then move on to the rest of the asp code
which validates other info and then directs them to the correct application.

If their password expires in 0 days, I want to direct them back to the 
login page.

The problem is that I am mixing asp and javascript.

Thanks for the help....

Peter Brunone (EasyListBox.com) wrote:

>Hi Brian,
>
> First, make sure the login page link works (i.e. make sure the URL is correct).
>
> Second, here's an example of how the JavaScript function confirm works:
>
>if(confirm("Your password is about to expire; change it now?")) {
> window.location.replace("passwordchange.asp");
> }
>
> The function returns a boolean value that you test for in the surrounding "if" statement. If all you want to do is say "Hey, you're being sent to change your password" and you don't want to give them a choice, just use the alert function instead.
>
>Cheers,
>
>Peter
>
> From: Brian Delaney brian.delaney at mccmh.net
>
>I have written a password checking app when my users login.
>
>If their password expires in 15 or less days I want to send a javascript 
>alert or confirm that informs them of when their password
>expires. After they click ok, it re-directs them to the desired app.
>
>The problem is that this codes works, but leaves the user at a blank page.
>
>if vpwdexpire < 15 AND vpwdexpire <> 0 then
>MsgStr = "Your password will expire in " & vpwdexpire & " days, 
>please change it."
>Response.Write(" confirm('" & MsgStr & 
>"') ")
>response.end
>end if
>
>The next line of code re-directs them to the application.
>
>So how do I send the user a pop-up that informs them of when their 
>password expires and after they click ok, the program directs them to the
>app?
>If the password is = 0 it send an alert and send them to the login page.
>
>Thanks
>
>
> 
>

*
*
*
This message, including any attachments, is intended solely for the use of the named recipient(s) and may contain confidential and/or priveleged information. Any unauthorized review, use, disclosure or distribution of this communication(s) is expressly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy any and all copies of the original message.




More information about the thelist mailing list