File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF AND JSP

 
sonia khetarpal
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
Richard Green
Ranch Hand
Posts: 536
  • 0
  • Mark post as helpful
  • send pies
  • 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?

 
Ravi Katam
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic