473,386 Members | 1,820 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,386 software developers and data experts.

Can I make browsers display contents of a window triggered by onClick before page finishes loading?

Hello,

Apologies for the somewhat wordy and garbled subject as I couldn't think how
to phrase it and this has hindered my searching for any previous answers.
It could be a really simple question. Anyway...

I have a simple javascript function that opens up a new window and writes
HTML code in it to display an image (I don't just display the image because
of problems with different margins in different browsers). Nothing exotic
there. I call this via 'onClick' on various links. Again nothing unusual
there.

The problem is that if I click on a link before the page is completely
loaded the various browsers I have tried will open the new window and even
write the HTML into it (Opera clearly does), but will wait until all the
images etc on the original page have been completely loaded before
displaying the image in the new window. This is in contrast to what happens
when you click on a normal link as that tends to take priority over the
original page.

Is there anything I can do to make my window jump the queue and be displayed
fully immediately?

G.

Jul 20 '05 #1
2 1831
"Graham J" <in***************@orangebucket.co.uk> writes:
Is there anything I can do to make my window jump the queue and be displayed
fully immediately?


Probably not.

What happens is what always happens when you open two pages at a time.
The browser only have a certain number of connections open at a time.
Other images that need to be loaded are queued, and will be loaded
when there is a connection available. The original page probably
already queued a bunch of images, so the new page starts out at the
back of the line. There is no way to prioritize the elements.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
> > Is there anything I can do to make my window jump the queue and be
displayed
fully immediately?
Probably not.


That is pretty much what I expected but it was worth a try :)
What happens is what always happens when you open two pages at a time.
The browser only have a certain number of connections open at a time.
Other images that need to be loaded are queued, and will be loaded
when there is a connection available. The original page probably
already queued a bunch of images, so the new page starts out at the
back of the line. There is no way to prioritize the elements.


That is certainly how I see things happening too.

In my original post I suggested that clicking on a normal link seemed to
jump the queue but having just tried it again I realise I didn't have the
whole story. If the link is to an image file then that will be loaded
straight away, jumping the queue as it were, but if it is to an HTML file it
seems any extra downloads required join the back of the queue (using IE, but
I think it is typical behaviour).

Oh well, on to plan B (well more like J actually...).

G.

Jul 20 '05 #3

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

Similar topics

1
by: BKM | last post by:
I've been using the following 2 ways to make sure my WebBrowser is finished loading a page before continuing with the next code. do:doevents:loop while WebBrowser.Busy do:doevents:loop until...
1
by: giurax | last post by:
Hi all, I am new to javascript. I have a window that on the 'onUnload' event opens a new window, the question is: have I any chance to know in the new window what page is the opener loading? (in...
1
by: amith | last post by:
Hi, I have a javascript, calendar.js which i use to enable my client to select the date. This calendar pops up on the click of a gif image. But the problem is that this poped up window is not...
82
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | ...
7
by: Oleg | last post by:
I have a web form let's say 'YYZ.aspx'. It has an iframe in it. When it loads it shows progress bar in IE this way: loading for page then again loading for page in iframe. This part is fine....
7
by: Dr J R Stockton | last post by:
I want page <URL:http://www.merlyn.demon.co.uk/js-quick.htmto open, in IE6, IE7, Firefox 2, and wherever else practicable, with the control labelled F.X0 fully visible at the top of the window and...
3
by: =?Utf-8?B?R3JlZyBN?= | last post by:
Hello, I'm running an asp.net, intranet web application using .net framework 1.1 on IIS5.1 / 6.0. Through the web application, I would like to press a button on the web page, have another window...
20
by: Mark Anderson | last post by:
Hi, I have this in an external JS library: ///////////////////////// function addMyEvent(){ var obj; if(document.attachEvent) { obj = document.getElementsByTagName('img'); for...
15
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.