Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Accessing custom class in javascript?

Accessing custom class in javascript?

Scheduled Pinned Locked Moved Web Development
javascripthtmlquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LiquidE_SA
    wrote on last edited by
    #1

    Good day to all. Here is some html I've been trying to access using JavaScript

    Files to be uploaded.

    Can anyone tell me how I can access the following div in JavaScript? I want to change its style.I've tried the following, but it doesn't work: ....... try { this.document.div.addMemberDiv.hideableDiv.style.display="table"; } ......... -- modified at 15:41 Thursday 18th May, 2006

    G 1 Reply Last reply
    0
    • L LiquidE_SA

      Good day to all. Here is some html I've been trying to access using JavaScript

      Files to be uploaded.

      Can anyone tell me how I can access the following div in JavaScript? I want to change its style.I've tried the following, but it doesn't work: ....... try { this.document.div.addMemberDiv.hideableDiv.style.display="table"; } ......... -- modified at 15:41 Thursday 18th May, 2006

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Use the getElementById method to locate elements in the document. The value 'table' is not valid for the display style. document.getElementById('hideableDiv').style.dislay = 'block'; --- b { font-weight: normal; }

      L 1 Reply Last reply
      0
      • G Guffa

        Use the getElementById method to locate elements in the document. The value 'table' is not valid for the display style. document.getElementById('hideableDiv').style.dislay = 'block'; --- b { font-weight: normal; }

        L Offline
        L Offline
        LiquidE_SA
        wrote on last edited by
        #3

        Thanks I tried it, but it didn't work. Any other ideas? Is there anything like a "getElementByClass()" ?

        G 1 Reply Last reply
        0
        • L LiquidE_SA

          Thanks I tried it, but it didn't work. Any other ideas? Is there anything like a "getElementByClass()" ?

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          Change "dislay" to "display" and try again.

          LiquidE_SA wrote:

          Is there anything like a "getElementByClass()" ?

          No. --- b { font-weight: normal; }

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups