[thelist] sending pop-up to client within asp

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


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




More information about the thelist mailing list