The javascript code in my html page :
<script type="text/javascript">
<!--
function overlay ()
{
document.body.insert({bottom:"<div id=\"overlay\"
style=\"width:" +
document.body.getHeight() + "; height:" + document.body.getWidth() +
"\"></div>"});
}
-->
</script>
The link in my page :
<a href="javascript:overlay()">overlay</a>
The result :
<div id="overlay" style=""/>
Why the style informations aren''t included ?
Thanks for your support.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
David BOUCHÉ wrote:> The javascript code in my html page : > > <script type="text/javascript"> > <!-- > function overlay () > { > document.body.insert({bottom:"<div id=\"overlay\" style=\"width:" + > document.body.getHeight() + "; height:" + document.body.getWidth() + > "\"></div>"}); > } > --> > </script>... >try adding $() and px. Browsers ignore style height and width without units. ... $(document.body).getHeight() + "px; height:... - Ken Snyder --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---