SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Resize Div Tags

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Resize Div Tags

    Hi!

    I am trying to resize my div tags using javacript.

    Following is the code, I have written or it.

    Code:
    document.getElementById(eleID).style.height = "570px";
    eleId is the Div id.

    But, its not working!!!!

    Does this make any difference

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  2. #2
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you need to surround your parameter for getElementById with single or double quotations unless eleID is an variable that stores the value.


  3. #3
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply. eleID is a variable.

  4. #4
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can I see the actual code populating the variable?



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •