473,788 Members | 2,848 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<FAQENTRY>I'm changing my page but nothing is changing on the screen. Why?</FAQENTRY>

VK
As per discussion in the thread
http://groups.google.com/group/comp....7e4f3a30f4d1c3
I'm proposing to add new FAQ entry:

----------------------------------------------------------------
I'm changing my page but nothing is changing on the screen. Why?
----------------------------------------------------------------

You may be experiencing the repaint delay problem. All existing
browsers do not update graphics context (screen content) until after
the current execution is finished. Until it's finished the DOM changes
are being accumulated but not reflected on the screen. The most
commonly used way to overcome this problem is by using micro-breaks
over setTimeout.

/* repaint delay vulnerable coding : */
function someLongProcess () {
document.getEle mentById('Loadi ngMessage').sty le.visibility =
'visible';
doLongProcess() ;
document.getEle mentById('Loadi ngMessage').sty le.visibility =
'hidden';
}

In the sample above nothing will work as the coder would expect.
LoadingMessage DOM element will remain invisible on the screen until
after someLongProcess function is fully executed. Only after that all
graphics context changes will be applied in one bulk, so
LoadingMessage element will be changed to visible and to hidden right
after that, so for the viewer it will not appear at all.

/* repaint delay aware coding : */
function someLongProcess () {
document.getEle mentById('Loadi ngMessage').sty le.visibility =
'visible';
window.setTimeo ut(doLongProces s, 60);
}

function doLongProcess() {
// long process;
document.getEle mentById('Loadi ngMessage').sty le.visibility =
'hidden';
}

----------------------------------------------------------------

Some notes to the FAQ text:
1) I'm struggling to find the right term for "the current execution is
finished". It is not really finished - that can be a few processes
over setInterval for instance. "current thread" or "current flaw" is
bad IMHO as well as because of terminology confusion (JavaScript
doesn't implement threaded model). Ideas?

2) This issue is really a "bug qualifying feature" - it forces to use
modularity based not on the programming logic but on graphics engine
weakness. So I think to file a feature request to Bugzilla based on
this FAQ. It doesn't matter that "everyone does the same" - some day a
UA should appear that does it not.

3) If anyone has timÕ it would be interesting to check if the "soft
break" would works, so something like:

function someLongProcess () {

window.setTimeo ut("document.ge tElementById('L oadingMessage') .style.visibili ty
= 'visible';", 60);
doLongProcess() ;
document.getEle mentById('Loadi ngMessage').sty le.visibility =
'hidden';
}

I can tell pretty sure that it will fail for synchronious XHR calls
where the suggested "hard break" is the only option. But maybe for
some other cases like the one in the thread I linked?
P.S. Yeah, I know... Started laud on rounding FAQ and ended up will
all another unrelated FAQ. The problem with the rounding FAQ is that
it is now in E=mc^2 state. I don't mean it's so genius :-) I mean that
while the suggestion itself is short and simple, the explanation and
proof of "why?" requires a whole big article I have to write first.
But this FAQ is still in my schedule.

Mar 13 '07 #1
4 1560
VK
On Mar 13, 7:09 pm, "VK" <schools_r...@y ahoo.comwrote:
As per discussion in the threadhttp://groups.google.c om/group/comp.lang.javas cript/browse_frm/thread...
I'm proposing to add new FAQ entry:

----------------------------------------------------------------
I'm changing my page but nothing is changing on the screen. Why?
----------------------------------------------------------------
Any comments or is it accepted as it is?

Mar 14 '07 #2
VK <sc**********@y ahoo.comwrote
On Mar 13, 7:09 pm, VK wrote:
<snip>
>I'm proposing to add new FAQ entry:
<snip>
Any comments or is it accepted as it is?
Why do you think an assertion of yours about your own intentions needs
acceptance (or, presumably, rejection)?

Richard.

Mar 14 '07 #3
VK said the following on 3/14/2007 1:25 PM:
On Mar 13, 7:09 pm, "VK" <schools_r...@y ahoo.comwrote:
>As per discussion in the threadhttp://groups.google.c om/group/comp.lang.javas cript/browse_frm/thread...
I'm proposing to add new FAQ entry:

----------------------------------------------------------------
I'm changing my page but nothing is changing on the screen. Why?
----------------------------------------------------------------

Any comments or is it accepted as it is?
Or is it that the people who might comment on it haven't had time? It is
so full of things that are incoherent that it's difficult to know where
to start. Rest assured, it is not "accepted as it is".

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 15 '07 #4
In comp.lang.javas cript message <et************ *******@news.de mon.co.uk>
, Wed, 14 Mar 2007 20:57:38, Richard Cornford
<Ri*****@litote s.demon.co.ukpo sted:
>VK <sc**********@y ahoo.comwrote
>On Mar 13, 7:09 pm, VK wrote:
<snip>
>>I'm proposing to add new FAQ entry:
<snip>
>Any comments or is it accepted as it is?

Why do you think an assertion of yours about your own intentions needs
acceptance (or, presumably, rejection)?

It is presumptuous for a failed FAQ maintainer to criticise the efforts
of one who is undoubtedly active.

VK's efforts can be judged easily enough by appearances and general
response3s - there is no need for you to do a general public vendetta.

--
(c) John Stockton, Surrey, UK. REPLYyyww merlyn demon co uk Turnpike 6.05.
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html-Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demo n.co.uk/news-use.htm: about usage of News.
No Encoding. Quotes precede replies. Snip well. Write clearly. Mail no News.
Mar 15 '07 #5

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

Similar topics

47
5093
by: VK | last post by:
Or why I just did myArray = "Computers" but myArray.length is showing 0. What a hey? There is a new trend to treat arrays and hashes as they were some variations of the same thing. But they are not at all. If you are doing *array", then you have to use only integer values for array index, as it was since ALGOL.
27
2544
by: VK | last post by:
<http://www.jibbering.com/faq/#FAQ3_2> The parts where update, replacement or add-on is needed are in <update> tag. 3.2 What online resources are available? Javascript FAQ sites, please check these first:- <http://developer.irt.org/script/script.htm>
39
13444
by: eruanion | last post by:
Hi, I've been working on this for a while now and I can't seem to find out what is wrong with my code. I have 2 files one c3common.js which only contains javascript functions for my main html page and my main html page which is test.html. They are of course part of a much bigger system of files but i have tracked down the problem to that reduced part of the code. The page loads perfectly fine however when i click search i get the error...
11
2458
by: jesdynf | last post by:
I'm having trouble applying a stylesheet to content I'm generating after the fact. Here's the sample code: <html> <head> <title>CSS/DOM Problem Example</title> <style type="text/css"> ..historylinks {
2
1355
by: Nickolay Ponomarev | last post by:
http://www.jibbering.com/faq/#FAQ3_2 says: Please change this to just: The old reference on mozilla.org was very bad; we're trying to update it after having moved it into the MDC wiki. The zip file contains the old version, I'll try to get it removed. (I'd appreciate if you CC me when replying, as I don't read this group).
19
3613
by: VK | last post by:
http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/ b495b4898808fde0> is more than one month old - this may pose problem for posting over some news servers. This is why I'm starting a new one] I'd still like to finish this rounding mess. As a startup lemma we can take that VK is the worst programmer of all times and places: let's move from here forward please. The usability of any program depends on exact behavior...
49
2406
$
by: google | last post by:
what dose a $ do in javascript, i have been given a bit of code and there are $'s all over the place, can someone explain their uses
6
1502
by: =?iso-8859-2?Q?K=F8i=B9tof_=AEelechovski?= | last post by:
At <http://jibbering.com/faq/index.html#FAQ4_41> IS Microsoft introduced a shortcut that can be used to reference elements which include an ID attribute where the ID becomes a global variable. SHOULD BE Microsoft introduced a shortcut that can be used to reference elements THAT ARE NOT FORM CONTROLS WITHIN A FORM ELEMENT which include an ID attribute where the ID becomes A PROPERTY OF THE GLOBAL WINDOW OBJECT and the scope of the window...
31
3547
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I modify the current browser window? ----------------------------------------------------------------------- In a default security environment you are very limited in how much you can modify the current browser window. You can use ` window.resizeTo ` or ` window.moveTo ` to resize or move a window respectively, but that is it. Normally you can...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10364
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.