Tangled web



Thursday, March 28, 2002

 
I have been reading the javascript section of Peter-Paul Koch's web site. He is a regular on the HTML Writers Guild email lists. Recently he gave a link to one of his pages, one how -- and why not to-- use a "browser-sniffer" code. So I read the javascript pages (some of them!) and then browsed over to his Curriculam Vitae where I see that he designed a web page for his mother's gallery, Karla Koch. She has some ceramics I would love to own! If only.......................





Wednesday, March 27, 2002

Event handlers
 


In a letter to the HWG-Basics list today, I saw the information that html includes many event handling attributes such as onClick() which I assumed were javascript. Apparently not! Thanks to Bert Doorn for the clarification (I was not the only one laboring under the misapprehension!)

OnClick is an HTML attribute (or XHTML if you put it in all lower case). It's not JavaScript.

Bert directed the questioner to http://www.w3.org/TR/html401/interact/scripts.html#adef-onclick for the full list of html atributes that resemble (to the untutored, I guess) javascript. In fact these attributes are heavaily used by javascript-- and other scripts too -- but are not themselves script parts.

He showed sample code for a link to open information in a new window that works even if the use has javascript turned of in their browser; if they have javascript, however, it is possible for the designer to size that new window to fit the (small) content.

Without javascript the link reads like this:
<a href="thepageurl.html" target="_blank">Click Here </a>


With javascripit, it can be written like this to size the window:

First, in the head section:
function Genie(theURL)

{

var theWindow = window.open(theURL,"","width=300,height=200")

return false;

}


Second, where the link is to go in the body:

<a href="JavaScript:Genie('thepageurl.html');">Click Here<./a>


These can be combined into one script to take care of javascript enabled and disabled browsers:
<a href="thepageurl.html" target="_blank" onclick="return false;
Genie('thepageurl.html');">Click Here</a>










Monday, March 25, 2002

Javascript
 
I've been trying to learn javascript for the longest time. I found a tutorial page that makes sense to me. It explains some things that previously I didn't get. Maybe you'll like it too. It's "Basic JavaScript Tutorials"




Friday, March 22, 2002

 
I am trying out BlogBuddy. So far it seems to work ok, except I cant "publish" after editing the template. Have to go back to Edit Blogger to do that. Dumb, I think



Thursday, March 21, 2002

Rollovers with css
 
The code below is from WebReference. This is the kind of thing I want to do, but have not mastered yet.


<html>
<head><title>Vertical Pure CSS Rollovers Demo</title>
<style type="text/css">
<!--
p.links {
margin:0px 0px 0px 0px;
}
.links a {
display:block;
width:180px;
border:1px solid black;
margin-bottom:-1px;
color:#00F;
padding:5px;
text-decoration:none;
font-weight:bold;
background-color:white;
}
.links a:hover {
background-color:#00f;
color:white;
}
-->
</style>
</head>
<body>
<h2>Experts</h2>
<p class="links"><a href="/dhtml/">DHTML</a></p>
<p class="links"><a href="/graphics/">Graphics</a></p>
<p class="links"><a href="/js/">JavaScript</a></p>
<p class="links"><a href="/xml/">XML</a></p></p>
</body>
</html>


Note the code is reproduced by substituting '& lt;' and '& gt;' for the left and right angled brackets of html tags.
The article offers cautions for problems in some browsers and some work arounds.

Note that we turn the tables with paragraphs and links. We turn our "links" paragraphs to zero-width margined block elements, and turn our links into block elements. To get rid of the double borders between elements we used our margin-bottom:-1px; trick. These menus work for IE5+, NS6+ and Opera 5+.
You can set a fixed width for your block element links, and the text will wrap automatically when users increase their font size. If you set white-space:nowrap; for the links, even with relative "em" widths, in Netscape 6 the link text will extend over the borders.


I cannot reproduce their example without a major re-working of my existing style sheets, which I'm not prepared to do at this point. I do, howver, want to try their methods.

The key seems to be designating the link as a block level element instead of inline, the default for a link.
Like this:
.links a {
display:block;

I believe this is why my effort to put a dotted line around a link did not work.





Tuesday, March 19, 2002

from the HWG techniques list
 
How to view someone else's external style sheet (from Larry Coats):

Netscape 4 is quite capable of displaying the CSS file.
In this case the URL was: http://www.wuhi.org/ And the CSS file is: basic.css
So up in the URL line, change http://www.wuhi.org/ to view-source:http://www.wuhi.org/basic.css
This works in both Netscape and IE (but not Opera).





Style sheets
 
I've been working on style sheets. The blog templates come with a variety... some quite sophisticated, others kind of retro and patchwork. I want to have elegant, simple style sheets and elegant, simple pages that are accessible to all or nearly all browsers.




Friday, March 01, 2002

Makin' whoopee
 
Whoopie! it works at last!

Well, I use the term "works" loosely. There re a few style things that are not responding to my directives; however, the way it looks now is not bad. So at least I can sleep on this.

The intention for this page is to provide a repository for various web tidbits I come across and risk losing.

I would like to figure out how to archive by topic instead of by date.





Error 550
 
FTP Help:

Error: 550 /blogs/tangledweb.html: No such file or directory ERROR: while trying to send file to server. QUIT 221 Goodbye.

Most likely this is caused by an invalid FTP Path setting. Please consult with your ISP's doucumentation regarding FTP access to your account. You can change your path setting by clicking on 'Settings' in the toolbar.





 
This is a test