[Javascript] Order of script-processing

SkyScanner skyscanner at eircom.net
Tue Sep 27 01:21:58 CDT 2005


Hi Troy - thanks for your input as well. The method I am using to 'show' and
'hide' the gifs is indeed to change the visibility. I hadn't thought of the
approach: if gif == visible, start the slow routine, but I could check that
out. The timer approach does seem to work OK, though, and as they are on for
just 10 milliseconds, the difference they make to the final appearance is
negligible.

Tim in Ireland.


----- Original Message ----- 
From: Troy III Ajnej
To: javascript at LaTech.edu
Sent: Tuesday, September 27, 2005 2:22 AM
Subject: Re: [Javascript] Order of script-processing


I've just got back from town, might be a little bit drunk, but this thread
is gettin on my nerves, -timers?
timers are unreliable and they double suck the processing power of your
allready heavy multidimensional array.
Timers should be considered only as the last resort, but somebody jumped to
it as first.
You've never explained on how you're invoking these: show, slow, hide
functions at all. That might've been very helpfull for people trying to
help.
I wouldd sugest the first thing that comes to my mind, -classical aproach.
(if you haven't tried this already!)
instead of calling the sllow function, -call the "show" function, 9why not
even use conditionals: loadinggif.style.visibility='visible';(than
posibly?!) if (loadinggif.style ... =='visible'){/and only then call:/
slow...()} , afterwards, in the  'slow' function after slow instructions
ended, include the: hide() function call. /but this might also trigger
earlier than the slow function has finished, than, if it does, why not use
some var true /false and the condition if true that is, -the slow function
has completed! than hide the damn loadinggif. This should kick in all
browsers and machinery used worlwide. Dont know why, but Timers always left
me down!...
 *even the scripts obey the cascading logic, -if you have functions defined
show();slow(); hide(); and called outside of some other function: it is
absolutely clear that the show() /hide() functions will execute
instantly,(while the slow one will take its time) same as with CSS, if you
declared hidden eleenmnt in CSS but you've declared the same element again
as visible below or inline - it will surely override your first declaration
long beforre it has ever been displayed.
It has hapened something very similar to this case with your script, -try
the above might proove fruitfull.
Troy III




More information about the Javascript mailing list