473,378 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Best way to open popup window on page load if session variable empty?

I have a need to open a popup window from one of my forms if a
particular session variable is empty. What is the best way to do this?
Once the popup opens, the user will make a selection from the window,
the session variable gets filled, the window closes, then no more
popup window because the session variable is not empty anymore.

Thanks in advance!
Nov 18 '05 #1
2 2058
Hi

Simply add an 'onload' event for any control on page and call a 'javascript' function that opens a model dialog
['showmodaldialog(...)

This has to be done like ... (code-behind-Page_Load) btn.Attributes.Add("OnLoad","openDialog();")
So simply add this if the session is not set else dont add it !!

Tell me if it doesn't work !!!(Sa*********@hotmail.com)
Nov 18 '05 #2
This doesn't work. Anyone have any other ideas?
On Sun, 25 Apr 2004 01:11:02 -0700, "Hmnt" <Sa*********@hotmail.com>
wrote:
Hi,

Simply add an 'onload' event for any control on page and call a 'javascript' function that opens a model dialog
['showmodaldialog(...)]

This has to be done like ... (code-behind-Page_Load) btn.Attributes.Add("OnLoad","openDialog();");
So simply add this if the session is not set else dont add it !!!

Tell me if it doesn't work !!!(Sa*********@hotmail.com)


Nov 18 '05 #3

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

Similar topics

6
by: aznFETISH | last post by:
I have a page where users upload pics of there own I want it to have a popup box that tells them I have now control of the following content If they hit ok the page loads if the hit cancel or no...
2
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on...
6
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a...
5
by: Mark | last post by:
Hi all, how do I open a javascript window from a code behind page? I was using Response.Write("<script language='javascript'>window.open('url','name','options');</script>") but now for some...
3
by: ACaunter | last post by:
Hi all, I need to set a session variable and open a new window with a single click of an asp.net button. My problem is that it always takes two clicks.. one sets the session and the other opens...
15
by: H00ner | last post by:
Hello All Hope you can help Been pulling my hair out about a popup problem in ASP.NET. One of the forms i wrote requires the user to select a product from a list in a popup web form. the...
4
by: jwlum | last post by:
I have the following problem under Internet Explorer only: 1. User fills out form data (myform.php) and clicks a button that fires myFunction() 2. myFunction() spawns a "hello, world" popup page...
5
by: rockdale | last post by:
Hi, all: I have a linkbutton and I use javascript to open another webpage in a new window. I also want to set my session variable value when this linkbutton get clicked. These session variable...
3
by: Tomasz J | last post by:
Hello Developers! A lot has been written about Java Script window.open() function and lost session state. But the most recent version of IE seems to handle it correctly. But now I have an...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.