.NETGURU
Popup Window
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.jscript.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

ruca
Hi,

DESCRIPTION:
I'm developing an application that when I need to insert a date, I use 3
textbox's and one image button. This image button open's a small popup
window with a calendar, allowing user choose date. Then, this popup returns
the year, month and day to the correspondent textbox. So far, so good.

PROBLEM:
The problem is that the applications opens so popup's as the number of
clicks that I do in image button. What I want is that only opens one popup
at a time. That when it's already one open, this closes and open a new
popup.

For that I have a .JS file that have this:
-------------------------------------------------
var NewWnd = null;

function DestroyWnd()
{
// close the current window
if(this.NewWnd != null)
{
this.NewWnd.close();
this.NewWnd = null;
}
}

function pick(Year,Month,Day)
{
if((this.NewWnd == null) || (this.NewWnd.closed))
{
var url = "Calendar.aspx?srcA=" + Year + "&srcM=" + Month + "&srcD=" + Day
this.NewWnd = window.open(url, "_blank", "height=200, width=200, left=250,
top=200, " +
"location=no, menubar=no, resizable=no, " +
"scrollbars=no, titlebar=no, toolbar=no", true);
}
else
{
DestroyWnd();
pick(Year,Month,Day);
}
}
-------------------------------------------------

Because buttons do postback my .JS variable (NewWnd) is reset and never
mantain the value of window.
How can I solve this?

--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Reply to this message...
 
    
Armin Zingler
"ruca" <Click here to reveal e-mail address> schrieb
[Original message clipped]

This is a VB.Net group. Please post only to the appropriate groups. Thx.

--
Armin

Reply to this message...
 
    
ruca
Hi Armin,
If you can see in my signature it says:

------------------------------------
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
------------------------------------

And I posted here too, because maybe It's possible I have to do anything in
my VB code (if I know the answer, I'm sure that I don't post here my
question).
If you can see too, you've posted your answer to my question in ASPNET and
JSCRIPT group. Like me, you've posted wrong.

Thanks anyway for your help.
ruca

"Armin Zingler" <Click here to reveal e-mail address> escreveu na mensagem
news:4096177e$1$12445$Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Armin Zingler
"ruca" <Click here to reveal e-mail address> schrieb
[Original message clipped]

It's not interesting whether you are using VB.Net for programming as long as
the question is not related to the VB.Net programming language. Even after
reading your question again I don't see any relation.

--
Armin

Reply to this message...
 
    
Cor Ligthert
Hi Ruca,

What I do not understand why it should be such an anoying popup windows.
Most people have a popup killer.

This can be nicely done by creating an area on your form where that calender
control is in and you hide another control and after that you hide the
calender control again.

Now you are taking a lot of work doing that what most people hate.

Just my thought,

Cor

Reply to this message...
 
    
Jim M (VIP)
Then how do you make the nice little area modal. Programmers usually want
to force an input. Is there a way to do this with an area on the page?

Thanks,

Jim

"Cor Ligthert" <Click here to reveal e-mail address> wrote in message
news:%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Cor Ligthert
[Original message clipped]


Cor

Reply to this message...
 
    
George Ter-Saakov
Just FYI:
Popup killers will kill popup window only if it served from another domain.
If it's served from the same domain of the original URL then Popup killers
will let it through.
So do not worry about it.

George.

"Jim M" <Click here to reveal e-mail address> wrote in message
news:%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Cor Ligthert
Hi George,

[Original message clipped]

in a Web situation.
They use Popup killers, that it is not killed does not make that people like
them.

Reason, you have always to click them away when you have used them and they
appear always on the place where is the information you need to type in the
answer. While it is not something that appears on another monitor you can
put it in aspx as well fixed in the same window.

However just my idea about this

Cor

Reply to this message...
 
    
George Ter-Saakov
I was not referring to your comments.
I was just stating that pop ups are ok to use even if 90% people using popup
killers.
Also i would like to notice that it's matter of personal preferences of
liking and not liking popups.

I have not seen any study on that but from my own experience popup(s) are ok
if they are logically fit into the application.

I have simple example.
On my site people can enter HTML message and at some point the might want to
embed image into text.
I think it's a good choice to popup a small window to allow them upload
image rather than navigating away from text they entered and having them
worried that all they have entered so far is lost because they did not click
submit button.

George.

"Cor Ligthert" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Cor Ligthert
Hi George,

I did not say you have to add a new pag, I think it is better to use a part
of the page as a special area for that. (And I am not talking about plain
html or asp, I am talking about serverside aspx applications)

And I said consequently that it is just my thought.

Cor

Reply to this message...
 
    
Scott M.
Fix your system clock.

"Jim M" <Click here to reveal e-mail address> wrote in message
news:%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
ruca
Anyone want to sugest something useful for my problem? I appreciate your
help.

--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"ruca" <Click here to reveal e-mail address> escreveu na mensagem
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Patrick Delifer
HI Ruca,

why don't you try to disable the button if the window is already open?

"ruca" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Vidar Petursson
Hi

No need to check... give it a name

window.open("pageToGo.aspx","myCalendarWin","Window SPECS");

This will reuse window if already open

--
Best Regards
Vidar Petursson
==============================
Microsoft Visual: Scripting MVP 2000-2004
http://www.icysoft.com/
http://www.deus-x.com/ Instant e-commerce
http://www.microsoft.com/technet/scriptcenter/
Playground: http://213.190.104.211/ ( IE 5.5+ only )

No matter where you go there you are
==============================
"ruca" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 
System.Globalization.Calendar




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification