[Javascript] (no subject)

Liset Liy liset at prensa-latina.cu
Thu Oct 25 19:31:35 CDT 2001


Hi folks,
I'm in doubt about a function programmed by me for the onClick event links. The reason of that function is to change the color of the active link to white and set black the color of rest - that efect was not possible with the alink property because the page is part of a frame so, when you click another page of the frame that link was not the active so the color changed, and that was no the desired efect!
So, I programmed that function but it's not working well. For some reason I can see the desired efect just when add an alert statement at the begininig - which is marked by comment. But, if there's not the alert or if there is the alert just before the return statement for example - what enssure that the function was executed completely! - the efects are not vissibles.

    function clicker(elem1,elem2,elem3,elem4,elem5,elem6,elem7,elem8,elem9,text) {
        //alert("if"); 
        elem1.style.color = "#ffffff"; 
        elem2.style.color = "#000000"; 
        elem3.style.color = "#000000";
        elem4.style.color = "#000000";
        elem5.style.color = "#000000";
        elem6.style.color = "#000000";
        elem7.style.color = "#000000";
        elem8.style.color = "#000000";
        elem9.style.color = "#000000";
        return true;
    }

My doubt is if the alert cause some event that cause that the browser repaint ?? In that case, how can I evoke that event without the alert?? In other case, please, I'll really appreciate if somebody explain me why my function is not working well and how can I fix the problem.

Any help is appreciated!
Yours,
Liset.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20011025/70873639/attachment.htm>


More information about the Javascript mailing list