473,653 Members | 3,000 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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


var row = document.create Element('TR');
row.setAttribut e('class',tipoc lase);
.....
var cell = document.create Element('TD');
var theButton = document.create Element('input' );
theButton.setAt tribute('type', 'button');
theButton.setAt tribute('value' ,description);
theButton.setAt tribute('class' ,ButtonClass);
cell.appendChil d(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 1903
<ne****@googlem ail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .

var row = document.create Element('TR');
row.setAttribut e('class',tipoc lase);
row.className = tipoclase;
.....
var cell = document.create Element('TD');
var theButton = document.create Element('input' );
theButton.setAt tribute('type', 'button');
theButton.setAt tribute('value' ,description);
theButton.setAt tribute('class' ,ButtonClass);
theButton.class Name = ButtonClass;

cell.appendChil d(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.classNa me = "className" ;

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


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

with " element.setAttr ibute("class",t ypeclass); " 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****@googlema il.com wrote:

Please provide proper attribution.
vvvvvvvvvvvvvvv vvvvvvvvvvvvvvv vvvv

In short: element.classNa me = "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.setAttr ibute("class",t ypeclass); " 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
15600
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 rel="stylesheet" type="text/css" href="mystyle.css?color=ffffff"> I have seen references in my temp Internet file directory that indicates this is possible, but I can't find any documentation how to do it.
6
3180
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 highlighted and linked. The second button, has only a partial "hit area" at the top of the image, although if you click the link, you can see the link border is properly place around the image. The rest of the buttons have no rolloever state or link...
19
157133
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 other cursors, but for some reason I can't get the cursor:hand to work in Firefox??? <div class="showHideDiv" onmouseover="this.style.cursor='hand'" onclick="showHideDiv('Price')"> Price </div> Thanks in advance. - CES
5
8732
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" class="select" style="background:yellow"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option>
1
9024
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 with Firefox browser. The firefox browser has problem to display a field after its style.display is reset. At the end of the JS function, I printed out the fields style.display value. They are set correctly. How to resovle this? My JS is : ...
0
959
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 after XP style these buttons have been shifted somewhat bottom of the toolbar. means they r not fitting as previous toolbar buttons. Usaually toolabr button top edge is start from the top of the toolbar
4
6668
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 ... But when I click one of the image button, the thing is different from what I thought. it seems that it has field name like submit1.x=24&submit1.y=10, looks like the form submit swith the image button position values instead of the value
4
4206
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() + this.ResolveUrl("~") + "styles/styledefault.aspx"); %>" />
6
1945
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 the php script from the browser using Ajax, the list is created fine in IE and Opera but on Firefox and safari I got the following error: "Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in...
0
8370
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8811
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8704
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8470
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5620
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4147
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1591
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.