Rails-spinoffers:
Okay, try it the simple way:
x.table :id => :someTable,
:width => ''100%'',
:height => ''95%'', # 25ex
(x is a Builder::XmlMarkup...)
the 25ex works, but it wastes room. I want the table to behave like
the client area of a desktop app.
So try it the elaborate way:
x.script do
x << ''$("someTable").setStyle({height:
(get_height() * 0.95)+"px"});''
end
And get_height() returns 725, the correct number. Its contents appear below.
And that doesn''t work either. What am I missing?
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
function get_height()
{
if (self.innerHeight) // all except Explorer
{
return self.innerHeight;
}
else if ( document.documentElement &&
document.documentElement.clientHeight )
// Explorer 6 Strict Mode
{
return document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
return document.body.clientHeight;
}
else
return 500;
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Phlip
2007-Feb-17 17:38 UTC
Re: How to set the height of a table to 95% of the window size?
Phlip wrote:> x.table :id => :someTable, > :width => ''100%'', > :height => ''95%'', # 25exMy bad! 95% started working again; please don''t ask why it stopped. ;-) -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---