473,563 Members | 2,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying a message box and then redirecting

Hi, I have a custom user login authentication page. There are times
when the login authentication succeeds, but before I redirect to the
home page, I want to display a popup with a warning message to tell the
user that their password is about to expire. I can't get the popup to
display AND the page to redirect (only one or the other).

I thought maybe setting the document.locati on would work, but it still
doesn't redirect to the specified page. This is my code right now:
~~~~~~~~~~~~~~~ ~~
FormsAuthentica tion.RedirectFr omLoginPage("us er name", false);

string strMsgBoxScript = "<script language='javas cript'>alert("W arning
message"); document.locati on=xyz.aspx'</script>"

Page.RegisterSt artupScript("Ms gBoxScript", strMsgBoxScript );
~~~~~~~~~~~~~~~ ~~
I tried adding in a response.redire ct("xyz.aspx") but that redirects
the page without displaying the popup.

This has been driving me crazy so I would be extremely grateful for any
insight!

Nov 13 '06 #1
5 9015
<de**********@g mail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Hi, I have a custom user login authentication page. There are times
when the login authentication succeeds, but before I redirect to the
home page, I want to display a popup with a warning message to tell the
user that their password is about to expire. I can't get the popup to
display AND the page to redirect (only one or the other).

I thought maybe setting the document.locati on would work, but it still
doesn't redirect to the specified page. This is my code right now:
~~~~~~~~~~~~~~~ ~~
FormsAuthentica tion.RedirectFr omLoginPage("us er name", false);

string strMsgBoxScript = "<script language='javas cript'>alert("W arning
message"); document.locati on=xyz.aspx'</script>"

Page.RegisterSt artupScript("Ms gBoxScript", strMsgBoxScript );
~~~~~~~~~~~~~~~ ~~
I tried adding in a response.redire ct("xyz.aspx") but that redirects
the page without displaying the popup.

This has been driving me crazy so I would be extremely grateful for any
insight!
This group covers classic ASP which is totally different to ASP.NET. Try
microsoft.publi c.dotnet.framew ork.aspnet.

--
Mike Brind
Nov 14 '06 #2
Why don't you use some client code in the popup to redirect the page.

windows.opener. document.locati on = url
<de**********@g mail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Hi, I have a custom user login authentication page. There are times
when the login authentication succeeds, but before I redirect to the
home page, I want to display a popup with a warning message to tell the
user that their password is about to expire. I can't get the popup to
display AND the page to redirect (only one or the other).

I thought maybe setting the document.locati on would work, but it still
doesn't redirect to the specified page. This is my code right now:
~~~~~~~~~~~~~~~ ~~
FormsAuthentica tion.RedirectFr omLoginPage("us er name", false);

string strMsgBoxScript = "<script language='javas cript'>alert("W arning
message"); document.locati on=xyz.aspx'</script>"

Page.RegisterSt artupScript("Ms gBoxScript", strMsgBoxScript );
~~~~~~~~~~~~~~~ ~~
I tried adding in a response.redire ct("xyz.aspx") but that redirects
the page without displaying the popup.

This has been driving me crazy so I would be extremely grateful for any
insight!

Nov 14 '06 #3
Hey Slim are you sure this is the right code?
well if not try this:

<input type=button name=login value="Login"
onclick=javascr ipt:TheFuncClic k();>

<script language=javasc ript>
function TheFuncClick
{
alert("Dear user, Your password is about to expire!");
window.location .href="login.as p"
}
</script>
Hope this helps

Best Regards
Firas S Assaad

Slim wrote:
Why don't you use some client code in the popup to redirect the page.

windows.opener. document.locati on = url
<de**********@g mail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Hi, I have a custom user login authentication page. There are times
when the login authentication succeeds, but before I redirect to the
home page, I want to display a popup with a warning message to tell the
user that their password is about to expire. I can't get the popup to
display AND the page to redirect (only one or the other).

I thought maybe setting the document.locati on would work, but it still
doesn't redirect to the specified page. This is my code right now:
~~~~~~~~~~~~~~~ ~~
FormsAuthentica tion.RedirectFr omLoginPage("us er name", false);

string strMsgBoxScript = "<script language='javas cript'>alert("W arning
message"); document.locati on=xyz.aspx'</script>"

Page.RegisterSt artupScript("Ms gBoxScript", strMsgBoxScript );
~~~~~~~~~~~~~~~ ~~
I tried adding in a response.redire ct("xyz.aspx") but that redirects
the page without displaying the popup.

This has been driving me crazy so I would be extremely grateful for any
insight!
Nov 14 '06 #4
Firas S Assaad wrote on 14 nov 2006 in
microsoft.publi c.inetserver.as p.general:
<input type=button name=login value="Login"
onclick=javascr ipt:TheFuncClic k();>
<input type=button name='login' value='Login'
onclick='TheFun cClick();'>

The javascript: part is not necessary.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 14 '06 #5

"Firas S Assaad" <fi******@gmail .comwrote in message
news:11******** **************@ e3g2000cwe.goog legroups.com...
Hey Slim are you sure this is the right code?
well if not try this:

<input type=button name=login value="Login"
onclick=javascr ipt:TheFuncClic k();>

<script language=javasc ript>
function TheFuncClick
{
alert("Dear user, Your password is about to expire!");
window.location .href="login.as p"
}
</script>
Hope this helps

I believe he wants to display some html not just a alert, but if not your
idea would do just fine
>
Best Regards
Firas S Assaad

Slim wrote:
>Why don't you use some client code in the popup to redirect the page.

windows.opener .document.locat ion = url
<de**********@ gmail.comwrote in message
news:11******* *************** @i42g2000cwa.go oglegroups.com. ..
Hi, I have a custom user login authentication page. There are times
when the login authentication succeeds, but before I redirect to the
home page, I want to display a popup with a warning message to tell the
user that their password is about to expire. I can't get the popup to
display AND the page to redirect (only one or the other).

I thought maybe setting the document.locati on would work, but it still
doesn't redirect to the specified page. This is my code right now:
~~~~~~~~~~~~~~~ ~~
FormsAuthentica tion.RedirectFr omLoginPage("us er name", false);

string strMsgBoxScript = "<script language='javas cript'>alert("W arning
message"); document.locati on=xyz.aspx'</script>"

Page.RegisterSt artupScript("Ms gBoxScript", strMsgBoxScript );
~~~~~~~~~~~~~~~ ~~
I tried adding in a response.redire ct("xyz.aspx") but that redirects
the page without displaying the popup.

This has been driving me crazy so I would be extremely grateful for any
insight!

Nov 14 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4249
by: TG | last post by:
Dear PHP Group, I have two forms that are used to collect user information. The first one takes user inputted values such as fullname, city, address etc. I want these values to display in the second form when it is called. Both forms are .htm files that call themselves when the submit button is press via the following command in each form:...
5
2525
by: Philip Ronan | last post by:
OK, here's my 2p worth: === Q. Why am I getting the error message 'Headers already sent'? A. PHP produces this error message when you try to set a header for a web page after you have already started sending out the content of the page. Web content is always delivered with a few headers at the top, ending with a blank line. For...
2
2888
by: Abdul Azeem | last post by:
Hi All, I have a requirement to display a message and then redirect the controls to some file, I tried with the below method but its not working, where as If I use server.transfer or server.execute it works but I cant give relative Url (it will dynamically genrate), If any one has an alternate way, pls respond. ShowMessage("Hello World")...
2
4325
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event...
2
1199
by: KJ | last post by:
Below is my web.config file. It's not redirecting. It was at one time. Please Help <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web>
8
2837
by: Taras_96 | last post by:
Hi everyone, We' ve come to the conclusion that we wish the user to be directed to an error page if javascript is disabled <enter comment about how a webpage shouldn't rely on javascript here :) >. I've read quite a few posts on how to do this, but none meet my need (the two main suggestions was set a jsEnabled variable in a <scriptsection...
4
1722
by: mantrid | last post by:
hello i have a form about half way down a web page, which posts criteria for the WHERE part of an sql which then returns the results at the bottom of the page. Trouble is when the page reloads it goes to the top of the page again so the results are not visible and the user is sometimes unaware that anything has happened. I could get a...
1
1261
by: rich2912 | last post by:
I have a page, with three drop down boxes. Each has four choices linked to a database. Here is what I would like to do: I would like the results of the three choices, to be displayed on the next page, after the submit button is clicked. I have searched here, but am unfamiliar with the terminolgy for this kind of feature. Any help, or...
7
6640
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a tabcontainer which has 1 panel already, however I want to try create the TabPanels dynamically. I followed the advice here: ...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.