Friday, August 31, 2007

Problem on HTML tag statement with single quotation when switch back and forth between "Edit Html" and "Compose" modes

When create/edit a post, you have 2 ways: "Edit Html" and "Compose". When you enter HTML directly under the "Edit Html" tab, and switch back and forth between "Edit Html" and "Compose", watch out. As an example, when you enter HTML like next statement under the "Edit Html" tab:
<span class='menuButton' href='' onclick='return buttonClick(event,"tocMenu");' onmouseover='buttonMouseover(event,"tocMenu");'>Table of Conents</span>
Switch to "Compose" mode, and come back to "Edit Html" mode, it becomes like:
<span class="menuButton" onmouseover="'buttonMouseover(event," onclick="'return" href="">Table of Conents</span>
Once again, it tries to replace single quotation to double quotation, but it failed to pursue propery. So, to be safeside, use double quotation, instead of single quotation, on HTML tag statement when you create/edit post.

Monday, August 13, 2007

single quotation will be converted to double quotation in adding HTML/JavaScript via Page Element page

At Blogger's "Add and Arrange Page Elements" page, you can add "HTML/JavaScript" element to your blog. However, when you save your HTML or JavaScript via that function, single quotation will be converted to double quotation automatically, unless the single quotation character(s) are in comment line(s).
For an example, about these lines:
<div class='menuBar'>
<a class='menuButton' href='http://cluelessbloggerhours.blogspot.com' onmouseover='linkButtonMouseover( event);'>Home</a>
<span class='menuButton' href='' onclick='return buttonClick(event,"tocMenu");' onmouseover='buttonMouseover(event,"tocMenu");'>Table of Conents</span>
<span class='menuButton' href='' onclick='return buttonClick(event,"labelMenu");' onmouseover='buttonMouseover(event,"labelMenu");'>Label</span>
</div>

After saving, those become like below. Check span tag statements.

<div class="menuBar">
<a onmouseover="linkButtonMouseover( event);" class="menuButton" href="http://cluelessbloggerhours.blogspot.com">Home</a>
<span ); tocmenu onmouseover="buttonMouseover(event," class="menuButton" href="" onclick="return buttonClick(event,">Table of Conents</span>
<span ); onmouseover="buttonMouseover(event," class="menuButton" href="" labelmenu onclick="return buttonClick(event,">Label</span>
</div>
This is not desirable behavior, since we supporse to be able to add/edit HTML line there. What makes this more confusing is that double quotation surrounding tag's attribute value for editing template directly at "Edit HTML" menu under Template tab will be automatically converted to single quotation, and, at there, single quotation used in attribute value will be converted to double quotation. Well, when you work your blog at the add-"HTML/JavaScript"-element window, keep the following way:
  • Use double quotation, instead of single quotation, to enclose clause of attribute value.
  • If it's JavaScript, then always put your JavaScript codes between HTML comment tags:
    <script type="text/javascript">
    <!--
    Your JavaScript codes here
    //-->
    </script>
And when you work your blog by editing template directly at "Edit HTML" menu under Template tab, then keep using single quotation to enclose attribute value.

Friday, August 3, 2007

window.status experiment

  • I cannot make window.status work (with mouseover in a tag) in my Blogger blogs??? It's on IE7, and this doesn't repro with local html file, thereby, it must be Blogger thing. I also tried on window.top.status, window.parent.status, window.self.status, top.window.status, top.window.top.status, top.window.parent.status, top.window.window.status, top.window.frames.status, top.window.self.status, ... etc.
    • By inline statements Move mouse pointer over here and check status bar.
      • The status bar should show the message: "It is working.", when the mouse pointer is over the above hypertext link. But, it doesn't. Instead, it shows "http://bloggerhours.blogspot.com/" at status bar. Something not right.
      • Code:
    • By calling javascript function: Move mouse pointer over here and check status bar.
      • Code
        • javascript:
        • HTML part
    In Blogger Help Group, I find posts about changing value of window.status, and I don't find that those replies mention anything else beside same kind of codes. Then, probably changing window.status value is working for other people, but me???