Re: [WSG] Quoting Code Snippets

2005-03-11 Thread Hassan Schroeder
Paul Novitski wrote: Personally I would find your line-numbering technique more effective if the line numbers showed up by default (perhaps dimmed) [this would serve IE users as well], and then the current line and its number were highlighted on hover. Especially with indented code it's not alw

Re: [WSG] Quoting Code Snippets

2005-03-11 Thread Paul Novitski
At 04:24 PM 3/11/2005, Hassan Schroeder wrote: Depending on what you're showing the code for, line numbers may be almost essential, or at least very useful; here's a sample I did a while back for someone to use as a model for a tutorial: Of course

Re: [WSG] Quoting Code Snippets

2005-03-11 Thread Hassan Schroeder
Ted Drake wrote: The most effective approach that I have seen so far is to put each line in an ordered list, and applying styles to make it more readable. I'm not sure if this would make it more usable. Depending on what you're showing the code for, line numbers may be almost essential, or at least

Re: [WSG] Quoting Code Snippets

2005-03-11 Thread Gez Lemon
The code tag is the correct element to use to markup code snippets. You could add a rule to your CSS to make it preserve white space: code { white-space: pre; } The obvious problem is that it won't preserve the white space when CSS isn't available. An alternative is to place the code tags bet

RE: [WSG] Quoting Code Snippets

2005-03-11 Thread Ted Drake
I have found the easiest approach is to cut and paste the code into the design view of Dreamweaver. This will translate all of the <,> and other symbols into the & style codes and your web page will display them correctly. Try wrapping the snippet in tags. The most effective approach that I have

[WSG] Re: Quoting Code Snippets

2005-03-11 Thread diona kidd
Wouldn't you know it. As soon as I sent out that email, I found the answer. Behold, the tag Thanks, Diona ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on po

[WSG] Quoting Code Snippets

2005-03-11 Thread diona kidd
I've been looking around on the web for a little bit and can't find the answer to my question. If it's rudimentary, please forgive me. How do I properly quote code (eg. Perl) in a webpage and have it display properly? The element seems the most appropriate for the job but it does not maintain in

Re: [WSG] problems with nodetype

2005-03-11 Thread Alan Trick
I don't know what the problem was, but I copied Gez's code and it started working, O:-) . Possibly just a spelling error or a missing a ' or one = instead of two. Thanks, Alan Ben Curtis wrote: I was tying to use nodeType to make sure that a node was an element in my javascript, but it wasn't w

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Ben Curtis
and don't use inline scripts. They are as bad as inline styles: Barkow-Lewinsky, Eva var links = document.getElementsByTagName('a'); for(i=0;i This would be better, in case you have multiple classes assigned to your a tag: if (links[i].className.match(/\bpopup\b/)) Better than class, t

Re: [WSG] problems with nodetype

2005-03-11 Thread Ben Curtis
I was tying to use nodeType to make sure that a node was an element in my javascript, but it wasn't working. Then when I did alert(aNode.nodeType); I got undefined, I was really confused so I tried alert(document.nodeType); and I got undefined again! Is there a reason I'm getting undefined in

Re: Re[2]: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Kornel Lesinski
On Fri, 11 Mar 2005 18:22:25 -, Chris Dawes <[EMAIL PROTECTED]> wrote: Never put URLs in onclick (javascript:blabla *is* URL) Forget that use this idea: That is tweaked non-standard accessibility killer. It will break even if I middle-click link in a normal browser... In my previous post I've

Re[2]: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Chris Dawes
> Never put URLs in onclick (_javascript_:blabla *is* URL) Forget that use this idea: if you have to open more than one window use a function to call the open window functions one after the other: openWindow(params) openWindow(params) hmmm... might be better than returning false from a f

Re: [WSG] problems with nodetype

2005-03-11 Thread Kornel Lesinski
On Fri, 11 Mar 2005 14:03:19 -, Nick Gleitzman <[EMAIL PROTECTED]> wrote: Is it just me, or is this list turning into javascriptgroup.org? HTML and CSS aren't the only web standards. DOM and ECMAScript are too. -- regards, Kornel Lesiński *

Re: [WSG] problems with nodetype

2005-03-11 Thread Nick Gleitzman
On 12 Mar 2005, at 12:23 AM, Alan Trick wrote: I was tying to use nodeType to make sure that a node was an element in my javascript, but it wasn't working. Then when I did alert(aNode.nodeType); I got undefined, I was really confused so I tried alert(document.nodeType); and I got undefined agai

Re: [WSG] problems with nodetype

2005-03-11 Thread Gez Lemon
On Fri, 11 Mar 2005 08:23:40 -0500, Alan Trick <[EMAIL PROTECTED]> wrote: > I'm getting undefined instead of DOCUMENT_NODE or 9? I used > if(aNode.tagName){ ...} to achive the required result, but it's a hack > and I want to know what's wrong with nodeType? I suspect it's because you've returned

RE: [WSG] centering floats?

2005-03-11 Thread Martin J. Lambert
Alan Trick wrote: > Centering the containiner is meaningless though if it doesn't have a > fixed width (that's smaller than it's container), and if it does have > a fixed width, than it ruins the whole point of the thing, to allow > the boxes to flow depending on the size of the container. > > Dav

[WSG] problems with nodetype

2005-03-11 Thread Alan Trick
I was tying to use nodeType to make sure that a node was an element in my javascript, but it wasn't working. Then when I did alert(aNode.nodeType); I got undefined, I was really confused so I tried alert(document.nodeType); and I got undefined again! Is there a reason I'm getting undefined ins

Re: [WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Kornel Lesinski
On Fri, 11 Mar 2005 11:49:57 -, Thorsten <[EMAIL PROTECTED]> wrote: Barkow-Lewinsky, Eva Never put URLs in onclick (javascript:blabla *is* URL) Don't use href="#". Put meaningful link there, and avoid duplication by using this.href. Second attribute for window.open is window name and works l

[WSG] javascript problem with pop-up on hyperlink click (IE6 displays an error, FF, Opera work fine)

2005-03-11 Thread Thorsten
hiya, i'm not sure if this is the right place to pose my question, but i'll dare it. if my question is unwanted on the list, i apologise, maybe someone can reply in private? i have a page from which i'd like to pop-up a window with more details upon clicking a hyperlink. the javascript i'm usin