Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to maintain reference to all pop ups

Reply
Thread Tools

how to maintain reference to all pop ups

 
 
sama via DotNetMonster.com
Guest
Posts: n/a
 
      09-11-2006
------------------------------------------------------------------------------
--

Hi ,
I have developed an application which consists of many pages.
On a page x, user can click a button to get some pop up.
Now when he navigates to other pages and comes back to this page again, on
click the button , i want to show the same pop up instead of creating a new
pop up.
So how do i store the reference for the pop up which should not be destroyed
when user navigates to different pages and comes back to same page.


Regards,
Sama

--
Sama
India

Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200609/1

 
Reply With Quote
 
 
 
 
S. Justin Gengo
Guest
Posts: n/a
 
      09-11-2006
Sama,

One way would be to just leave the popup open. As long as the javascript for
the popup is naming the window and as long as the same window name is always
used the javascript will re-use the window of that name each time the popup
is opened.

If you need to store what values are in the popup you can do that in a
number of different ways. If there isn't a lot of information to save you
could persist it in viewstate as you move from one page to another, although
that could get complicated. Another choice (probably better, again as long
as not a lot of information is being stored) would be to save to a session
variable. If a lot of information needs to be save then you could write it
to a file on the system and use a pointer saved in session to recover the
file (maybe xml) or you could save to a database.

Regards,

--
S. Justin Gengo
Web Developer / Programmer

Free code library:
http://www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche


"sama via DotNetMonster.com" <u26474@uwe> wrote in message
news:6621985479da8@uwe...
> ------------------------------------------------------------------------------
> --
>
> Hi ,
> I have developed an application which consists of many pages.
> On a page x, user can click a button to get some pop up.
> Now when he navigates to other pages and comes back to this page again, on
> click the button , i want to show the same pop up instead of creating a
> new
> pop up.
> So how do i store the reference for the pop up which should not be
> destroyed
> when user navigates to different pages and comes back to same page.
>
>
> Regards,
> Sama
>
> --
> Sama
> India
>
> Message posted via DotNetMonster.com
> http://www.dotnetmonster.com/Uwe/For...p-net/200609/1
>



 
Reply With Quote
 
 
 
 
sama via DotNetMonster.com
Guest
Posts: n/a
 
      09-11-2006
Hi justin,
first of all thanks a lot for your prompt reply.
I think I am not very clear in asking the question. I have a
different issue.
I have used a variable as:

<input id="Button1" type="button" value="button" onclick="displayUploadPopUp
()"/>


var opopup;
if(opopup && opopup.open && !opopup.closed) {
alert('already open so setting focus');
opopup.focus();
}
else {
alert('new window');
window.open('Child.aspx', 'ChildpopUp', 'width=468,height=211,scrollbars=no,
titlebar=0, menubar=no');
}

now when the parent page refreshes and i click the button "Button1" , else
part is executed even when the pop up is already there. The point is that the
variable opopup is lost when the parent page is refreshed.
So now the quetion is how do i remeber that the child pop up was already out
and instead of showing a new pop up, how do i focus the old one.

Hope i am clear.

--
Sama
India

Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200609/1

 
Reply With Quote
 
S. Justin Gengo
Guest
Posts: n/a
 
      09-11-2006
Sama,

Ok, I understand what you want now. Give this a try:

http://theopensourcery.com/jswin.htm

Regards,

--
S. Justin Gengo
Web Developer / Programmer

Free code library:
http://www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche


"sama via DotNetMonster.com" <u26474@uwe> wrote in message
news:6621e9154988c@uwe...
> Hi justin,
> first of all thanks a lot for your prompt reply.
> I think I am not very clear in asking the question. I have a
> different issue.
> I have used a variable as:
>
> <input id="Button1" type="button" value="button"
> onclick="displayUploadPopUp
> ()"/>
>
>
> var opopup;
> if(opopup && opopup.open && !opopup.closed) {
> alert('already open so setting focus');
> opopup.focus();
> }
> else {
> alert('new window');
> window.open('Child.aspx', 'ChildpopUp',
> 'width=468,height=211,scrollbars=no,
> titlebar=0, menubar=no');
> }
>
> now when the parent page refreshes and i click the button "Button1" ,
> else
> part is executed even when the pop up is already there. The point is that
> the
> variable opopup is lost when the parent page is refreshed.
> So now the quetion is how do i remeber that the child pop up was already
> out
> and instead of showing a new pop up, how do i focus the old one.
>
> Hope i am clear.
>
> --
> Sama
> India
>
> Message posted via DotNetMonster.com
> http://www.dotnetmonster.com/Uwe/For...p-net/200609/1
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
UPS service won't start/no UPS tab in Power Options jdimester Computer Support 6 01-23-2010 03:27 PM
pop-ups? John Firefox 32 03-08-2005 08:56 AM
pop up prevention problem; for wanted pop ups joe doe Firefox 2 03-03-2005 08:08 AM
Pop-ups, spyware, and the like PopUlist349@hotmail.com Firefox 3 12-30-2004 12:06 AM



Advertisments