473,406 Members | 2,336 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,406 software developers and data experts.

Repaint styles

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
3 3458
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ike | last post by:
I changing the size of frames dynamically in a page (I am restricted in that I cannot perform a reload of the content of any of the frames). In MSIE, when I resize the frames, thinks repaint...
2
by: Joe A | last post by:
I'm using Access 2002 on Windows XP PC, 500 megs ram, Front end/back end app. I have a simple form that draws a thermometer to indicate progress of code that is running. The thermometer form...
4
by: Bob | last post by:
Trying to repaint a form named fcon using a new filter: 'Repaint the form with the new data Forms!fcon.FilterOn = False Forms!fcon.Filter = "RecNo = " & currecno & " AND Currentvalue = -1"...
0
by: Víctor | last post by:
Hello, I'm doing a Intranet application which shows some information panels dinamically. Each panel is a dll loaded dinamically using Reflection and inherits from Panel class. To display...
6
by: Karl | last post by:
We are developing a series of financial calculators based on ASP.NET technologies. Here's our first one: http://www.pine-grove.com/web%20calculators/Loan.aspx When the user clicks "Calc",...
4
by: MLH | last post by:
Setting form's Picture property to another file from within VBA doesn't repaint the form with new bitmap - for instance... Me.Picture = "c:\pics\MyNewPic.jpg" I tried Me.Repaint afterward,...
2
by: aaron.kempf | last post by:
hey guys i have an ETL winform in VB 2005 and it's like-- off in la-la land. i know it's doing things-- it's happily crunching away. but i'm confused about what i need to do to make the main...
7
by: Paul | last post by:
I have a VB.NET form with a DataGrid. When I toggle to Excel (for example) and then back to my application the repaint of the DataGrid is really slow. You can see the repainting happening. When...
0
by: philaphan80 | last post by:
Is there a way to force the Visual Studio IDE (Page Control at design- time) to refresh / repaint itself upon drag & drop of *any* item from the toolbox? Perhaps a method I need to override within...
0
by: milkay | last post by:
<I have code that uses 2 images> the program creates a window and then when u press play, it removes all components in the container. then, i add a NewPanel object. i add mouse listeners and all...
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
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
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,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.