Friday, May 27, 2005
Security Pipeline | Review: Netscape 8 Is Better Firefox Than Firefox
It's very interested. Some like it; Others dislike it.
I am very curious about the IE engine embedded.
As you heard, IE7 is a tabbed browser in the near future, but at this point, each tab in Netscape 8 is an IE. So what happen Netscape 8 with IE7 engine? Can it be doule-layer tabs?
Tuesday, May 24, 2005
Looking JS function which convert BR tag to DIV tag.
For example :
LINE One<BR>
Line Two<BR>
Then convert to
<DIV>LINE One</DIV>
<DIV>Line Two</DIV>
Monday, May 23, 2005
How to associate IE favorite shortcut key?
Browser shortcut key is convenient for your most visit sites.
In FireFox, I have set up "yahoo" for http://mail.yahoo.com.
I try to find the similar feature in the IE. In the favorite property
dialog, I find Shortcut Key in the Web Document tab. But, it say "None"
and I can't change it at all. What's wrong in here? How do I set it up?
Tuesday, May 17, 2005
AOL browser
When I start AOL browser, I notice three more service running in window
task manager.
One AOLHostMonager.exe, two AOLServiceHost.exe. They takes some space,
and only one AOLServiceHost.exe goes away when AOL browser is closed. I
really don't like it.
Messaging Pipeline | AOL Launches Web-Based AIM Mail Beta Today
Another comment about AIM e-mail :
1, The interface is modern and neat, except the annoying banner ads. Well, the ad is how AIM to make money. I suggestion text ad.
2, AIM mail has Interesting spell checking interface. Easy for user to locate typo, but not accessible definitely. Well, like this kind rich text interface, ADA compilance is always sacrifice.
Monday, May 16, 2005
IE and getElementById
Firefox will tell you "INPUT", but IE "FORM".
<SCRIPT language="javascript">
function checkFoo() {
var fooNode = document.getElementById("foo");
alert(fooNode.tagName);
}
</SCRIPT>
<FORM name="foo">
Name : <INPUT type="text" id="foo">
<INPUT TYPE="button" onClick="checkFoo()" value="Get Foo Node">
</FORM>
Friday, May 13, 2005
Thursday, May 12, 2005
AOL offers free email | The Register
I just played around it. The big banner is very annoying.
Don't see any big innovation in the interface. The pull down menu is not big deal.
There are a lot of javascript errors.
The HTML editor looks like from HTMLArea.
Ground Hog
Two days ago outside my window, I saw a ground hog cross street and
hidden under a tree near by road. I saw that ground hog yesterday, but
not today. The local traffic is so busy, I hope she move to safe territory.
IE can't set innerHTML for TBODY
<TABLE border="1">
<THEAD>
<TR><TH>Col 1</TH><TH>Col 2</TH><TR>
</THEAD>
<TBODY id="fooTbody">
</TBODY>
</TABLE>
<SCRIPT language="JavaScript">
var fooBody = "<TR><TD>Cell 1</TD><TD>Cell 2</TD></TR>";
var node = document.getElementById("fooTbody");
node.innerHTML = fooBody;
</SCRIPT>
Wednesday, May 11, 2005
Thunderbird disappointed.
I just installed thunderbird, then imported mail from NS 7.2.
I could see some folders and mails.
Unfortunately, when I opened it again, I only saw few folders, no mail.
I uninstalled it and reinstalled it again, but I just couldn't see the
import tool again.
I searched web. There were few sites telling people how to configure
profile manually.
It just got me crazy. Back to NS 7.2 again. Sigh! Well, At least, I
still can receive Netscape web mail.
Monday, May 09, 2005
Opera table problem when multiple THEAD
See table sample :
| Head one | Body one | Head two | Body two |
|---|
HTML Code sample :
<TABLE border="1">
<THEAD><TH>Head one</TH></THEAD>
<TBODY><TD>Body one</TD></TBODY>
<THEAD><TH>Head two</TH></THEAD>
<TBODY><TD>Body two</TD></TBODY>
</TABLE>
How to know current style?
<script language="JavaScript" type="text/javascript">
function checkStyle(node) {
if (document.all) {
alert(node.currentStyle.fontStyle);
} else if (window.getComputedStyle) {
alert(window.getComputedStyle(node,null).getPropertyValue("font-style"));
}
}
</script>
<em onclick="checkStyle(this)">This is italic. Try to click me.</em>
Wednesday, May 04, 2005
How to control HTML tag style?
I can use javascript to control BODY style like
document.body.style.fontFamily = fooFont;
document.body.style.fontSize = fooSize;
How about for HTML tag?
You may question me what's for and what's the point since all html tags
are inside BODY?
I am working on HTML editor.
In Firefox, I turn on designMode inside IFRAME. I click a brand new
document, then Firefox tells me I am clicking HTML tag, not BODY tag.
Thursday, April 28, 2005
rgb color
In Firefox, I can get a node color in javascript like
window.getComputedStyle(node,null).getPropertyValue("color")
Then, I get rgb(0,%200,%200) for black and rgb(255,%200,%200) for red.
I try to convert them back to hex code, but what does "%200" mean?
Wednesday, April 27, 2005
Opacity
Does Safari fully support opacity?
Try Safari, and see the difference in the line two.
--------------------------------------------
Line one : no opacity.
| Line two : 50% opacity in TD. |
--------------------------------------------
Monday, April 25, 2005
Annoying image alignment.
Since Mozilla can't render vertical alignment correctly (Bugzilla Bug 276766) .
Then, I come out this solution.
------------------
A IMG {border-width:0px; vertical-align:-1px;}
-----------------
Unfortunately, this cause more truoble for IE 6.
1, The inline align doesn't work.
<A HREF=# ..><IMG align="left"></A>
2, Table cell height can't be control any more.
<TD><A HREF=# ..><IMG xxx></A></TD>
Friday, April 22, 2005
Safari 1.3 designMode
In Safari 1.3, I try to turn iframe designMode="on".
I can type in something, copy/paste, and turn text bold by ctrl+b, but nothing happen when I try to use execCommand() to apply bold font.
Not sure what's going wrong, but I doubt either document or TextRange object not same as IE/Mozilla.
So far, the available resource is very limited. I see few people raise this question in Dave Hyatt blog, but no one have answer yet.
Event, Apple doesn't provide any sample.
Not sure is good idea to implement HTML editor for Safari 1.3.
Safari 1.3 is Apple a big step, but still have a lot of things need to improve.
Safari 1.24 and Safari 1.3 coexist
Before I updated to OS 10.3.9, I duplicated Safari, and I renamed the
duplicated one as Safari 1.2.4.
After I updated to 10.3.9, I found that duplicated one became 1.3, so I
renamed them properly.
I got one called "Safari 1.2.4", the other "Safari 1.3".
Then, I checked both user agent.
Safari 1.24 : Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en)
AppleWebKit/312.1 (KHTML, like Gecko) Safari/125.12
Safari 1.3 : Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en)
AppleWebKit/312.1 (KHTML, like Gecko) Safari/312
I am wondering that Safari 1.24 is really 1.2.4 or not.
Thursday, April 21, 2005
Expand iframe to no scroll bar
I have a piece of JS code to expand iframe size, then scroll bar disappears.
//sample iframe code for ccExpandIFrame
//<IFRAME SRC="foo.html" NAME="dynamicFrame" marginHeight="0" marginWidth="0" width="100%" //FRAMEBORDER="no" SCROLLING="yes" onLoad="ccExpandIframe(this)">
//</IFRAME>
function ccExpandIframe(fooFrame) { // only good for page in the same domain name.
location.hash="#";
var fooWin = eval("window." + fooFrame.name);
if (document.getElementById) {
try {
//if (location.hostname == fooWin.location.hostname) {
var fooBody = fooWin.document.body;
var fooHeight=fooBody.scrollHeight + fooBody.offsetHeight - fooBody.clientHeight;
var fooWidth=fooBody.scrollWidth + fooBody.offsetWidth - fooBody.clientWidth;
fooFrame.style.height = fooHeight;
fooFrame.style.width = fooWidth;
fooFrame.style.borderStyle="none";
if (document.all) {
fooBody.scroll="no";
fooFrame.frameBorder=0;
}
//}
} catch (e) {}
}
}
But my problem is when I try to include other site into iframe, permission denied is triggered. Once cross domain, the other domain window object can't be accessed.
The only way I can access is IFRAME object. Still need to find out a way when IFRAME showing scroll bar, but it's pretty much dead end.