[thelist] sending pop-up to client within asp

Brian Delaney brian.delaney at mccmh.net
Mon Mar 7 14:35:02 CST 2005


Just want to say thanks (the code from VOLKAN works great).
Another quickie.

Once the password is verified I do the following:

if  (page=="1")
    {
    self.location = "staff_home_page.asp"
    }

The problem I have is that the staff_home_page.asp page checks for a 
session variable of userid and session loggedin = true.

So it would something be likethis:

if  (page=="1")
    {
    session("userid") == "<%rsUserinfo(userid)%>";
    session("loggedin")== "true";
    self.location = "staff_home_page.asp"
    }
  
How do I set these using the javscript?

Thanks




VOLKAN ÖZÇELİK wrote:

>Here is the modified code, with alert and response.end. It should work
>I suppose.
>
>Cheers,
>Volkan.
>
><%
>if  vpwdexpire < 15 AND vpwdexpire <> 0  then
>  MsgStr = "Your password will expire in " & vpwdexpire & " days,
>please change it."
>   %>
>   <script type="text/javascript">
>       var MsgStr = "<%=MsgStr%>";
>       if(MsgStr!="") {
>               alert(MsgStr);
>               self.location = "changepassword.asp";
>       }
>   </script>
>   <%
>   response.end
>end if
>%>
>
>,-----
>
>On Mon, 07 Mar 2005 08:22:55 -0500, Brian Delaney
><brian.delaney at mccmh.net> wrote:
>  
>
>>The next line validates which page they requested and redirects them to it.
>>
>>Peter Brunone (EasyListBox.com) wrote:
>>
>>    
>>
>>>   Then yes, you probably want to use an alert rather than a confirm.
>>>
>>>   Since it's the *next* line that doesn't seem to work, could you
>>>show that one to us?
>>>
>>>
>>>*
>>>From*: Brian Delaney brian.delaney at mccmh.net
>>><mailto: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.
>>>
>>>      
>>>
>>*
>>*
>>*
>>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.
>>--
>>
>>* * Please support the community that supports you.  * *
>>http://evolt.org/help_support_evolt/
>>
>>For unsubscribe and other options, including the Tip Harvester
>>and archives of thelist go to: http://lists.evolt.org
>>Workers of the Web, evolt !
>>
>>    
>>

*
*
*
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