Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wait for a page to be ready before showing it

I'm pretty sure that this is not possible but I could be wrong. I've been asked to keep a web page on hold until another page is ready before showing the latter.

Consider for example pageA.html that has a link to pageB.html. pageB has some jScript (is actually GWT but pretend you don't know) that creates the page.

The user would like to keep showing pageA until pageB is ready to show. Is that possible, keeping the two pages separate?

like image 544
algiogia Avatar asked Dec 28 '25 16:12

algiogia


2 Answers

You could take a look at AngularJS. (SPA = Single Page Application). You can load new views ("pages") in the current page and show a loader or your current page until the loading is finished.

like image 123
Mathias Dewelde Avatar answered Dec 31 '25 06:12

Mathias Dewelde


You could use jQuery $(window).load(function(){}); and create an overlay on the existing page.

I.e. User loads page A and you have an overlay immediately visible blocking the visibility of the page. When the load event is triggered you can remove the overlay.

This is slightly different from what you've asked but may be an approach.

JS Fiddle Example

like image 24
Dean Whitehouse Avatar answered Dec 31 '25 06:12

Dean Whitehouse



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!