Programming Archives

Removing iframe Horizontal Scrollbar

Posted on February 6, 2008 at 16:14 XHTML 8 Comments

Oh c’mon! A few days ago, I was already about to die trying to remove a freakin’ horizontal scrollbar of the iframe in this fanlisting. The problem is only associated with Internet Explorer. :devil: The last resort I could do was to compare it line after line with another code that does not show the said scrollbar. So how did it turn out? Well, the only thing that was missing was a line before the document type declaration (DTD). I then remembered that the same thing holds true for the scrollbar colors that are not supported in Firefox (I used to do it before). So anyway, for instance, the first line of the code should not be:

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

Instead,

<!--anything goes here (perhaps even a blank line)-->

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

Whew, glad I did it. And oh, please bear with the title of this post. :sweat:

On other whatnots…

JavaScript: Displaying Date and Time

Posted on September 23, 2007 at 16:19 JavaScript 1 Comment

Our first exercise in CMSC 140. I was, by any luck, able to do it without any help from my classmates and, as a matter of fact, even enjoyed doing it! ๐Ÿ˜‰

P.S. Also prints out “Hello World!” n times, where n is the date.

date_time.html

<script type="text/javascript">
   var nelson = new Date();
   var date = nelson.getDate();
   var day = nelson.getDay();
   var month = nelson.getMonth();
   var fullYear = nelson.getFullYear();
   var hours = nelson.getHours();
   var minutes = nelson.getMinutes();
</script>