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

CSS not rendering in dynamic areas of an HTML page - IE only

This is sort of a design/javascript question. It involves CSS
rendering in dynamic areas of a page using IE.

E 6 & 7

HI There, We've created some example static html pages (using CSS)
that look great in IE. We are now converting these into dynamic pages
that use javascript to dynamically update certain areas of the page.
After the conversion the dynamic areas of the page do not render the
CSS styles (the styles are not displaying correctly). This only
happens in IE. The styles display correctly for other browsers
(firefox).

I am using the javascript DOM to update the dynamic areas of the site.
For example when creating a <atag that needs attribute
class=over....I add the following code.

linktag = document.createElement("a");
linktag.setAttribute("href",pathName);
linktag.setAttribute("class","over");

it's the class=over that is not rendering when the page is updated.
Has anyone seen this?

Thanks,

Brian

Dec 21 '06 #1
3 1909
br**********@gmail.com wrote:
This only happens in IE.
linktag.setAttribute("class","over");
Internet Explorer has a very broken implementation of setAttribute.
Use .className instead.

--
David Dorward <http://blog.dorward.me.uk/ <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Dec 21 '06 #2
br**********@gmail.com wrote:
>
linktag = document.createElement("a");
linktag.setAttribute("href",pathName);
linktag.setAttribute("class","over");

it's the class=over that is not rendering when the page is updated.
Has anyone seen this?
I believe you need to use 'className' ('class' is, I think, a reserved
word) ie.

linktag.className = "over";
Andrew Poulos
Dec 21 '06 #3
thanks!!! That worked!

Andrew Poulos wrote:
br**********@gmail.com wrote:

linktag = document.createElement("a");
linktag.setAttribute("href",pathName);
linktag.setAttribute("class","over");

it's the class=over that is not rendering when the page is updated.
Has anyone seen this?
I believe you need to use 'className' ('class' is, I think, a reserved
word) ie.

linktag.className = "over";
Andrew Poulos
Dec 22 '06 #4

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

Similar topics

0
by: Roel Wuyts | last post by:
CALL FOR CONTRIBUTIONS International Workshop on Revival of Dynamic Languages http://pico.vub.ac.be/~wdmeuter/RDL04/index.html (at OOPSLA2004, Vancouver, British Columbia, Canada, October...
30
by: Matt Probert | last post by:
Is it just me (probably) or is Mozilla and the newer Firefox full of CSS rendering bugs? I ask, because some strange effects occur with Mozilla and Firefox which don't happen in Opera and dare I...
6
by: Adam Smith | last post by:
Not sure if this is the best place for this but here goes... I'm trying to create a dynamic newsletter generator. There will be several controls to select from to generate the layout of the...
10
by: Jason Pettys | last post by:
I have an ASP.NET page that my client wants to e-mail. So in IE we choose File > Send > Page by E-mail, which opens up either Outlook or Outlook Express with the HTML page content as the message...
14
by: Joe | last post by:
Hello All: I am trying to dynamically populate a web page with literal content and controls (textboxes and checkboxes (and eventually two buttons - the buttons do not appear in the code yet). I...
5
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever....
2
by: Giedrius | last post by:
hi, i have an idea to make admin tool on home computer, that would generate html files using some kind of templates and database data and put these generated html files to public web server, witch...
7
by: dino d. | last post by:
Hi- I want to create a dynamic image with areas so that when the user clicks different areas, the user jumps to those pages. The problem is, I can't seem to figure out how to do this efficiently....
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: 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
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
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
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,...
0
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...

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.