Jump to content
Sign in to follow this  
spider_designs

set class of dynamically created layer???

Recommended Posts

Ok ... I have been learning dhtml (js/html/css) for the past few days and what Im trying to do is create a layer that can be added to the page after it has been loaded (Currently I am only working with internet explorer)I had intended to use the <tag class="thisclass"> to format the style and <tag id="thisid"> to keep track of it through js

var winTH = document.createElement('div');winTH.id = "win_T_Holder" + dynWinCount;//winTH.class = "ThisClass"  -- returns error even although -//<div id="win_T_Holder0" class="thisClass"> is validhtml (forgive me if its not :-) )

so I guess my question is :- Is there any way to set class="thisClass" through javascript??btw this is my first post ever Go Easy;)Spider

Share this post


Link to post
Share on other sites

Your welcome.You will run into that sometimes when dealing with tag attributes and CSS properties.Feel free to ask if you run into anymore troubles. :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...