By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,730 Members | 1,567 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,730 IT Pros & Developers. It's quick & easy.

Repaint styles

P: n/a
age
I have written a javascript function to change the id of a tag in my
page when i click a check box. In firefox the style change takes
immediate effect. In IE it doesn't.

Is there a way to force the page to redraw without posting the form
back to the server?

Cheers.

Nov 14 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
ASM
age a écrit :
I have written a javascript function to change the id of a tag in my
page when i click a check box. In firefox the style change takes
immediate effect. In IE it doesn't.

Is there a way to force the page to redraw without posting the form
back to the server?
function change(element, id) {
element.id = id;
if(IE) element.className = 'colorYellow';
}

Anyway that works in each of my browsers (even IE Mac)

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 14 '06 #2

P: n/a
ASM said the following on 11/14/2006 11:30 AM:
age a écrit :
>I have written a javascript function to change the id of a tag in my
page when i click a check box. In firefox the style change takes
immediate effect. In IE it doesn't.

Is there a way to force the page to redraw without posting the form
back to the server?

function change(element, id) {
element.id = id;
if(IE) element.className = 'colorYellow';
}

Anyway that works in each of my browsers (even IE Mac)
Depending on how you define the variable IE. I hope not with the
navigator object.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 14 '06 #3

P: n/a
ASM
Randy Webb a écrit :
ASM said the following on 11/14/2006 11:30 AM:
>age a écrit :
>>I have written a javascript function to change the id of a tag in my
page when i click a check box. In firefox the style change takes
immediate effect. In IE it doesn't.

Is there a way to force the page to redraw without posting the form
back to the server?

function change(element, id) {
element.id = id;
if(IE) element.className = 'colorYellow';
}

Anyway that works in each of my browsers (even IE Mac)
I mean : directly (only with change of div's id)
Depending on how you define the variable IE. I hope not with the
navigator object.
As usually :-)

IE = false; /*@çç_on IE=true; @*/

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.