473,406 Members | 2,217 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.

IE6 not aplying style to DOM created buttons...??? (FireFox working fine)


var row = document.createElement('TR');
row.setAttribute('class',tipoclase);
.....
var cell = document.createElement('TD');
var theButton = document.createElement('input');
theButton.setAttribute('type','button');
theButton.setAttribute('value',description);
theButton.setAttribute('class',ButtonClass);
cell.appendChild(theButton);
row.appendChild(cell);

the above code works fine in Mozilla 1.0.7 (applying the style
correctly) but it looks like IE doen't care about the "class"
attribute... It presents fine the table.. but without any style (plain
old cells and buttons). Any idea? Any workaround?

Thanks in Advance..

Nov 23 '05 #1
3 1876
<ne****@googlemail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...

var row = document.createElement('TR');
row.setAttribute('class',tipoclase);
row.className = tipoclase;
.....
var cell = document.createElement('TD');
var theButton = document.createElement('input');
theButton.setAttribute('type','button');
theButton.setAttribute('value',description);
theButton.setAttribute('class',ButtonClass);
theButton.className = ButtonClass;

cell.appendChild(theButton);
row.appendChild(cell);

the above code works fine in Mozilla 1.0.7 (applying the style
correctly) but it looks like IE doen't care about the "class"
attribute... It presents fine the table.. but without any style (plain
old cells and buttons). Any idea? Any workaround?


In short: element.className = "className";

--
Dag.
Nov 23 '05 #2
>
In short: element.className = "className";


Not IE6 o FireFox work with that.. they just stuck.

with " element.setAttribute("class",typeclass); " Firefox works
perfectly and applies the css style perfectly.. IE6 just ignore that..
it works but without applying any style. "element" is a element "type"
"input" for which I set up more attributes that work... only the css
style don't work with IE6.

Any Idea

Nov 23 '05 #3
ne****@googlemail.com wrote:

Please provide proper attribution.
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

In short: element.className = "className";
Not IE6 o FireFox work with that.. they just stuck.


WFM. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922
Firefox/1.0.7 (Debian package 1.0.7-1) Mnenhy/0.7.2.0

Have you had a look at the JavaScript Console?
with " element.setAttribute("class",typeclass); " Firefox works
perfectly and applies the css style perfectly.. IE6 just ignore that..
it works but without applying any style. "element" is a element "type"
"input" for which I set up more attributes that work... only the css
style don't work with IE6.


I think it is because of IE's known problem with "windowed controls".
PointedEars
Nov 23 '05 #4

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

Similar topics

19
by: Roger | last post by:
How can I pass parameters to a style sheet? I have noticed a couple of sites are now passing variables to the style sheet, which appear to be substituted at run time. For example: <link...
6
by: AJBopp | last post by:
I'm wrestling with CSS variations between Firefox and IE. I'm trying to create rollover buttons in a menu frame. It is working perfectly in Firefox but in IE only the first button is properly...
19
by: CES | last post by:
All, I don't know why I always get stuck on the stupid questions... This is pretty straight forward... I want to change the cursor to the hand on a mouse event. This works just fine, if I use...
5
by: Isha | last post by:
Hi all, I wanted to change the background color for only the first option in a select box, but following changed the background color for the whole dropdown box. <select name="alltags"...
1
by: RonY | last post by:
I have a dropdown which calls SetTimePeriod method on change the selection. In the JS function, I reset the field style.display based on what the selection is. This works fine with IE but not working...
0
by: harishdixit1 | last post by:
Hello friends I m creating an ATL DLL which will attached a toolbar in IE. I implemented XP style & it is working fine means controls now have XP Style. On my toolbar i have Button menus. But...
4
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all I have the following code: I am trying to use the value of the image button to evaluate what plan the user has chosen, i.e. it request("submit1")="Basic", then the user chose basic plan...
4
by: coconet | last post by:
Server is Win2K3/IIS6. I have an ASPX page with this in the <headtag: <link rel="stylesheet" type="text/css" href="<% Response.Write( "http://" + Request.ServerVariables.ToString() +...
6
by: raknin | last post by:
I am creating a dynamic list on the server using php file,when I run the PHP script in all 4 browsers (IE 6, Firefox 2, opera and safari 3) every think go Ok and the list is created. but when I call...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
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...
0
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,...

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.