4 Replies - 1661 Views - Last Post: 16 November 2013 - 06:28 PM Rate Topic: -----

#1 November-06  Icon User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 391
  • Joined: 04-January 11

Wait for New Page to Load

Posted 11 November 2013 - 02:15 AM

The title of this post may not say it all so I'll explain.

In Windows Application, if I use ShowDialog instead of Show, the caller form cannot be clicked unless the form called is closed.

I like a similar functionality in opening pages but with some differences. The following is what I need to do:

First, I use window.open to open a page in a new tab or window. When doing this, I want asp.net to show my updateprogress. While new tab is executing its Page_Load event, I want the caller page to still continue with loading until the page called completes loading. Problem is, once the new tab is created, loading stops in the caller page allowing the user to click another button causing the page to hang for sometime while the previous page called is being loaded still. Then it executes, the new command right after. If the new command should only take 2 seconds, it may take too long since the first process is not yet finish.

Second, after Page_Loads (for the page called), loader in caller page should stop.

I just don't know how to do this. How should I make the two pages communicate? What should I use for this? Do I need AJAX, jQuery or Javascript?

Please help.

Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Wait for New Page to Load

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8947
  • View blog
  • Posts: 33,544
  • Joined: 12-June 08

Re: Wait for New Page to Load

Posted 11 November 2013 - 09:37 AM

The last time I looked into this you were not able to dictate the modal nature of a web browser when dealing with two pages in different tabs. That exceeds the authority of a web page.
Was This Post Helpful? 0
  • +
  • -

#3 h4nnib4l  Icon User is offline

  • The Noid
  • member icon

Reputation: 1181
  • View blog
  • Posts: 1,673
  • Joined: 24-August 11

Re: Wait for New Page to Load

Posted 12 November 2013 - 02:06 PM

There's not a "clean" way that I know of to do this. The only way I can think of is to use AJAX to pass some value back to the server when the 2nd page is done loading, and have the original page poll the status of some attribute until the value has changed. But as modi123_1 alluded to, I really don't know how well that will work.
Was This Post Helpful? 0
  • +
  • -

#4 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,499
  • Joined: 16-March 11

Re: Wait for New Page to Load

Posted 16 November 2013 - 12:42 PM

I'm think while it is possible to do this with Jquery/Javascript/Ajax that you're trying to push windows forms functionality into a web page environment. Completely different animal here, and I would advise redesigning. Why don't you just simulate a separate page from within a page using some clever css, and html to create a popup of sorts. With that being said you can easily eliminate usage of your caller features until the user is done with the popup.
Was This Post Helpful? 0
  • +
  • -

#5 laytonsdad  Icon User is online

  • Cheese and Sprinkles
  • member icon

Reputation: 431
  • View blog
  • Posts: 1,826
  • Joined: 30-April 10

Re: Wait for New Page to Load

Posted 16 November 2013 - 06:28 PM

If you just want to show progress why not use a jquery plugin like a lightBox instead of a new window?

Just wondering?

or there is also the nProgress.js plugin. I personaly really like that one.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1