• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

JSF AND JSP

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i WANT TO SET THE HEIGHT OF CONTENT IN DIV MY CODE IS

function getSize(){
var screenHeight = screen.height;
var contentHeight = screenHeight - 210 +"px";

var content = document.getElementById("content");

content.style.height=contentHeight;

}
AND I AM CALLING getSize() in body onLoad but the height is not getting set
what is the problem if somebody can help?
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this has nothing to do with jsf. mods move it to html/javascript forum.

why dont you put some debug statements to see what went wrong?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First let me ask you a question. Are you using JSP and JSF together? If you are then, the element ID which you are giving as an argument to java script might be different from the "content" when it is transformed to html code in the background. Try looking at the source of the page and see if the ID of the element is same as "content". If it is different then you need to give that ID to java script.
 
reply
    Bookmark Topic Watch Topic
  • New Topic