PDA

View Full Version : back to basic...



birdman
09-10-2005, 09:50 AM
I've been wondering for years on how to use the "?" and ":" when writing a script. As a result (I believe...), I end up writing a script, the hard way :(

Anyways, can anyone give an opinion about my script? (here's another example on how hard to it is for me to write something supposedly to be, simple?)

http://www.geocities.com/talkshowhost85/js/tsh_aabc.js

online sample @ http://www.geocities.com/talkshowhost85/home.html

thank u loads!

Twey
09-10-2005, 10:16 AM
Erm...
1) If you're going to write a script only for one browser, IE is not the one to go for. It is highly non-compliant.
2) It works OK in Firefox.
3) That background image (http://www.geocities.com/talkshowhost85/ps_bg.gif) is horrible. Renders the page nigh unreadable.
4) ? : is if shorthand. 1 == 1 ? yes() : no(); means if one is one, then yes(); otherwise, no().

birdman
09-10-2005, 03:20 PM
1) which browser should i choose then?
2) which background did you mean? for the mainpage or the calendar
3) are the methods used suitable? it's a big pain in the ass for me to write it!

thank u :)

birdman
09-10-2005, 03:26 PM
and uh... the background. i thought it's okay, did u mean it was not readable via i.e or firefox?

Twey
09-10-2005, 03:32 PM
I don't have access to IE, but in Firefox (and probably most other browsers) the colour of the text against that background is very hard to read.

mwinter
09-11-2005, 04:39 PM
I've been wondering for years on how to use the "?" and ":" when writing a script.The construct you're referring to, the conditional operator (?: ), should be used as part of an expression, just like most other operators.

Consider if, the statement equivalent. Its use focuses primarily around code path branches; where certain statements should only occur given a specific condition (or conditions). The conditional operator should be used when a value in an expression should change based on a condition (or conditions).

For example:


var errors = [];

/* ...
* Some code that may encounter errors to be shown to the user.
* ...
*/

/* If error messages were added to the the errors array, */
if(errors.length) {
/* ...display them in a dialog box. */
alert(errors.length + ' error'
+ ((errors.length > 1) ? 's' : '')
+ ' occurred:\n\n'
+ errors.join('\n'));
}Here, if there is more than one error message, an 's' is added to form a plural; if only one is present then no suffix is added.


As a result (I believe...), I end up writing a script, the hard way :(The repetition can certainly be avoided. In addition, multiple document.write calls can severely slow execution.


if('function' != typeof Array.prototype.push) {
Array.prototype.push = function(x) {
var i = 0,
j = this.length >>> 0,
n = arguments.length;

while(i < n) {this[j++] = arguments;}
return j;
};
}

function daysInMonth(m, y) {
var d = new Date(y || (new Date()).getFullYear(), m + 1, 0);

return d.getDate();
}
function showEvent(n) {
if('undefined' != typeof events[n]) {alert(events[n]);}
else if(noEvent) {alert(noEvent);}
}

var noEvent = '',
events = {9 : 'Happy birthday Andrea! *hugsssss!',
10 : 'This note feature was immediately put after 30 minutes of completing the first version!\n\nUiTM convo from the 10th to 19th.',
11 : 'Shakespeare\'s Macbeth @ Actors Studio Bangsar tonight - 8:30pm',
14 : 'Double Bill @ KLPac begins!',
19 : 'happy birthday Ellis :D *muaks!'},
days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
now = new Date(),
d = now.getDate(),
m = now.getMonth(),
y = now.getFullYear(),
a = ['<table class="calendar">',
'<caption>' + days[now.getDay()] + ', ' + d + ' ' + months[m] + ' ' + y + '</caption>',
'<tr>'];

for(var i = 1, n = daysInMonth(m, y); i <= n; ++i) {
if(!((i - 1) % 5) && (i - 1)) {a.push('</tr>', '<tr>');}
a.push('<td class="' + ((i == d) ? 'today ' : '') + ('undefined' != typeof events[i&#93; ? 'event' : '') + '" onclick="showEvent(' + i + ')">' + i + '</td>');

}
if((i = n % 5)) {a.push('<td class="empty" colspan="' + (5 - i) + '"></td>');}
a.push('</tr>', '</table>');
document.write(a.join('\n'));The dates now use one-based indicies, and are added through the events object. The class attribute structure has also been changed. Don't create classes for everything; use the document structure whenever possible. For example, you used 'calTD' for every table cell within the calendar table, when '.calTB td' would have sufficed needing far less markup.

You can see the new classes from looking through the code, but briefly they are:


calendar - The main class that indicates that a particular table contains a calendar.
event - This cell class marks that date as one that contains an event.
today - Obvious, I hope. :)
empty - Used on the final cell that appears for months that will create partial rows (February, and 31-day months) so that the border can be styled away (or whatever).


A possible replacement for your current style sheet might be:


table.calendar {
border-collapse: collapse;
font: 90% sans-serif;
width: 10em;
}
table.calendar caption {
font-weight: bold;
margin-bottom: 0.5ex;
}
table.calendar td {
color: #000000;
background-color: #eeeeee;
border: 1px solid #000000;
cursor: pointer;
text-align: center;
}
table.calendar td.empty {
background-color: transparent;
border-style: none;
}
table.calendar td.event {
color: #1177ff !important;
}
table.calendar td.today {
background-color: #bbbbbb;
color: #ffffff;
font-weight: bold;
}



and uh... the background. i thought it's okay, did u mean it was not readable via i.e or firefox?Unreadable in Firefox as the background becomes fully visible after about a sixth of the way down the page.

Why does this happen? I'm not entirely sure. When I view the document locally, it doesn't occur, so I assume it's related to the junk injected by GeoCities.

Some general advice, though:


Dump XHTML. It currently has no value on the Web, unless you content negotiate it to XML-only parsers. As you serve the markup as HTML, it won't even benefit these user agents.
Stop using 'div soup'. Your markup at the moment is basically div and span elements, with a load of line breaks (br) thrown in. Most of those span elements should be level 2 headings (h2), and most of those div elements should be paragraphs (p). The line breaks can (and should) be replaced by margins (usually provided by default for headings).
Instead of adding a class attribute to each list item of your lower-roman list, add a single one to the list element itself.
Mark-up the other two lists as lists, not broken lines.
Don't use pixel font sizes as IE cannot resize these. Use percentages instead. Moreover, use 100% for body text, 85% of default for legalese, and never go lower; 10px is [i]far too small. Black-on-white at that size is guaranteed to give me, and many others no doubt, a painful headache.
Unless you are content to use Verdana at its default size, don't use it. If you shrink it down, other fonts (used when Verdana doesn't exist on a system) will probably be completely unreadable.
Remove the layout table. Float the right-hand column instead.


Finally, to answer a question I just happened to read, a generic font is the type of typeface: serif (TNR), sans-serif (Arial), monospace (Courior New), cursive, and fantasy[1]. As font-family declarations use a fallback mechanism, the last family should be generic in case none of the specified fonts were available. A simple example is:


font-family: Arial, sans-serif;As some browsers default to serif fonts, this would ensure that your document was presented with a sans-serif font even if Arial didn't exist (like in Linux).

Hope that helps,
Mike


[1] The latter two don't have well-known examples, but are mainly decorative. Cursive fonts have connected glyphs just like you'd find in handwriting. Fantasy fonts have a rather vague description, but I'd think of them as rare, special typefaces used in logos. For instance, a vampire film might use in its advertising a typeface that features points at the base of stems to convey the association with a vampire's fangs; it's not a functional font but, in this instance, represents an idea.

Twey
09-11-2005, 07:13 PM
Ah, that's what "fantasy" is for. I always wondered :)

mwinter
09-11-2005, 07:21 PM
Ah, that's what "fantasy" is for. I always wondered :)The CSS Specification provides Alpha Geometrique (http://www.fonts.com/findfonts/detail.htm?pid=409052) and Critter (http://www.fonts.com/findfonts/detail.htm?pid=202881) as examples of a fantasy font. As you can see, they do represent characters unlike picture fonts such as Wingdings, but they are exclusively decorative - not something you'd use for an entire document.

Mike

birdman
09-17-2005, 02:28 PM
in depth, accurate, logic :)

More questions and statements + needing more tips and advices

1) So what is it that XHTML has to offer? To be honest i face a lot of problems with XHTML; certain things are totally removed like the simple "name" attribute. I almost cannot do anything with XHTML!
1a) Is XHTML 1.0 Transitional is just as good and "convenient" as older HTML?
1b) What should I use then?

2) I'm sorry for the page formatting. I'm bad in designs AND if you notice, I try too hard on "practising-clean-markups" which I find troublesome.

3) For the script I wrote... the reason I've to put too much document.write is because I don't have much knowledge in JavaScript. Again I say -> if you notice (I guess you do), I had to apply actions to every single conditions. My .js file is 13kb and is very ridiculous for a simple calendar...

4) Is shortcuts in CSS recommended? e.g:

font: 10px verdana;

or

border: 1px #000000 solid;

- I received errors when validating my css file (using the validator in w3c.org)

5) The example you gave...

.calTB td

How does it work?

Isn't it suppose to be -

.calTB, td

or, they're just the same?

THANK YOU :D

Twey
09-18-2005, 10:05 AM
1) So what is it that XHTML has to offer? To be honest i face a lot of problems with XHTML; certain things are totally removed like the simple "name" attribute. I almost cannot do anything with XHTML!
There are alternatives available to (almost) all the features XHTML no longer considers a part of itself. The biggest change in XHTML is the switch to pure CSS for styling, rather than HTML attributes (<font face=... &c.). See if there is a CSS equivalent available. The name attribute is not one of the things that has been deprecated, as far as I know. Remember that XHTML is case-sensitive. Always use lower-case.

1a) Is XHTML 1.0 Transitional is just as good and "convenient" as older HTML?
Don't know about "convenient." Using correct (X)HTML, just like using correct English, is never convenient for you; what you're worrying about is how convenient it will be for the user. As most modern browsers support XHTML, although HTML has not been deprecated, there is currently no obvious advantage to using XHTML. However, if HTML does become deprecated (which, having seen some of the junk some people call web design, I sincerely hope it does) you'll just save yourself the job of totally rewriting the page.

1b) What should I use then?
I always try to use XHTML1.0 Strict, although I may fall back to Transitional if there is a vital element that I can't use in Strict. John would totally disagree with me in this paragraph. XHTML 1.1, I believe, requires itself to be served up as text/xhtml rather than text/html, which may confuse some browsers. So, for now, I stick to 1.0. It's not such a big step to 1.1 if the need arises. 1.1 and I also had some extended disputes about the correct way to use an image map, which is another reason I'm a little leery of it :)

2) I'm sorry for the page formatting. I'm bad in designs AND if you notice, I try too hard on "practising-clean-markups" which I find troublesome.
Design should really come first. Now, I usually put a big "DO NOT USE" stamp on WYSIWYG editors, but to rush up a quick, basic design is the one thing I'd recommend them for. You can then rewrite the page to make the code more palatable and add the smaller features that aren't as vital to the overall design.

4) Is shortcuts in CSS recommended? e.g:

font: 10px verdana;

or

border: 1px #000000 solid;

- I received errors when validating my css file (using the validator in w3c.org)
They are as recommended as CSS is. Any browser that supports modern CSS standards should support correct CSS shorthand.


5) The example you gave...

.calTB td

How does it work?

Isn't it suppose to be -

.calTB, td

or, they're just the same?
.calTB td means any <td> element within an element with the class of "calTB".

mwinter
09-18-2005, 04:13 PM
1) So what is it that XHTML has to offer?That would seem to be a very open-ended question, but I assume you mean from your perspective as a developer?

Well, as things stand, not much. You can use XML for content management on the back-end of your site, but you could (and I think should) transform all output to HTML before sending it to a user. You could use extending markup languages like MathML in combination with XHTML, but not all browsers support them.

I think the potential benefits are geared towards the user and browser vendors, more than anyone else, as XHTML is meant to be a light, easy-to-parse language. However, that only holds if browser vendors enforce conformance (as they are supposed to do, according to the XML specification), and developers write valid, semantic markup.


To be honest i face a lot of problems with XHTML; certain things are totally removed like the simple "name" attribute.The name attribute still exists where it should (form controls, for instance), but in many other cases, the id attribute is meant to replace it.


1a) Is XHTML 1.0 Transitional is just as good and "convenient" as older HTML?Some see Transitional XHTML as proof-of-concept, whereby the W3C merely wanted to show that HTML could be implemented in its entirety with XHTML. However, Transitional HTML was provided so that presentational markup could be used whilst CSS support was truly poor, but we are past that period now. Therefore, Transitional XHTML should be avoided like the plague.


1b) What should I use then?Preferably Strict HTML 4.01 with CSS for presentation. However, if there are occasions where you need a Transitional feature (like the target attribute), then use it.


I try too hard on "practising-clean-markups" which I find troublesome.It comes down to having detailed knowledge of what HTML elements are available, and what they are best used for marking-up. There are obviously one-to-one examples like lists for lists, paragraphs for paragraphs of text, and tables for tabular data. Some less obvious, but preferable uses, can be clouded by how you think of them when they're normally rendered.

For instance, you avoided heading elements because they're normally rendered very large and bold, with enormous borders. Similarly, a large set of links, like those you might find at the bottom or side of a document are normally best marked-up using lists. However, some people wouldn't because of how they think lists usually look. This is where CSS comes in; it gives you the control over these elements and allows you to choose how they are presented.

There's nothing intrinsically wrong with using div and span elements when there really isn't anything better to use instead. Just be careful not to go overboard.

Give it time.


3) For the script I wrote... the reason I've to put too much document.write is because I don't have much knowledge in JavaScript. Again I say -> if you notice (I guess you do), I had to apply actions to every single conditions. My .js file is 13kb and is very ridiculous for a simple calendar...Well, you're free to use the replacement I wrote in my preivous post if you want.


4) Is shortcuts in CSS recommended?I would say so. Why write three or four separate declarations when one shorthand declaration will do.


I received errors when validating my css file (using the validator in w3c.org)The errors are related to something else. One is using the non-standard scrollbar-base-color property. The validator won't recognise it, so it will treat it as an error. The second is using Microsoft's proprietary filters property and syntax. Comment these out when validating.


5) The example you gave...

.calTB td

How does it work?There are various ways of combining selectors, each changing how a rule is matched against elements.

I'll start with the child combinator, >. When this appears between two simple selectors (an element name, id attribute value, etc.), the rule will only apply if the element matching the right-hand selector is a direct child of the left-hand selector. Consider the fragment: #A > #C {...}


1.

<div id="A">
<div id="C">


2.

<div id="A">
<div id="B">
<div id="C">In the first case, the rule will be applied to the inner div element, #C, as it appears as a child of #A. In the second case, the rule won't be applied because #B is the child of #A. Here, #C is said to be a decendent of #A.

Next, the adjacent sibling combinator, +. This matches the right-hand element when it follows the left-hand element, and both share the same parent.

Consider the fragment: #A + #C {...}


1.

<div>
<div id="A"></div>
<div id="C"></div>
</div>


2.

<div>
<div id="A"></div>
</div>
<div id="C"></div>


3.

<div>
<div id="A"></div>
<div id="B"></div>
<div id="C"></div>
</div>In the first case, the rule would be applied to #C as it does follow after #A and both have the same parent (they are siblings). The latter two examples won't match, though. In the second case, #C does follow after #A, but they have different parent elements. In the third case, #B (not #C) follows #A.

The final combinator, and the most common, is just white space and forms descendent selectors. I showed a descendent relationship above: where an element is simply contained within another element. It could be a child, a grand-child, or even further removed. As long as the element on the right (td, using the original example) is nested within the element on the left (.calTB), the rule will match.

Unfortunately, IE doesn't support the first two types (child and adjacent), but they can be useful in decent browsers that do (Firefox and Opera, for instance).


Isn't it suppose to be -

.calTB, td

or, they're just the same?No. Commas are separators and allow you to define several selectors for a single rule. If you used that, the rule would apply to both elements with the class name calTB, and all table cells. What you want is all table cells that are decendents of elements (a table, in your case) with the class name calTB.

Take a look at Selectors (http://www.w3.org/TR/REC-CSS2/selector.html) in the CSS specification (http://www.w3.org/TR/REC-CSS2/). There are some good examples in there. Note that IE doesn't support the bracket form of attribute selector (5.8.1), either.




The name attribute is not one of the things that has been deprecated, as far as I know.It has been obsoleted in XHTML 1.1, but no it hasn't been formally deprecated in either HTML or XHTML 1.0. However, in most cases it continues to exist for backwards-compatibility only.


As most modern browsers support XHTML [...]Mozilla and Opera support XHTML, though the implementations are inferior to their HTML counterparts (Mozilla cannot incrementally render XHTML). IE obviously doesn't. I can't find up-to-date information about Konqueror and Safari, though I last read that there were problems with their implementations (Konqueror treated XHTML like HTML). ICEsoft seem a little fuzzy about their support in ICEbrowser.


However, if HTML does become deprecated (which, having seen some of the junk some people call web design, I sincerely hope it does) you'll just save yourself the job of totally rewriting the page.If it does happen, it won't be for at least ten years, I'd say. Use HTML. There is no advantage at all in having browsers error correct XHTML into HTML. You just look like everyone else jumping on the latest technological bandwagon.


XHTML 1.1, I believe, requires itself to be served up as text/xhtml rather than text/html, which may confuse some browsers.XHTML 1.1 has no provisions for being served as HTML, so it should be served with the application/xhtml+xml MIME type. Note that Appendix C in XHTML 1.0 is only informative, and doesn't mean that XHTML should be served as HTML. The guidelines simply mention how to achieve the greatest compatibility if you do it.

Mike

birdman
09-23-2005, 04:22 AM
Compatibility is the overall issue, no?

1) How different is JavaScript for Netscape compared to JavaScript for I.E?
2) comment...

<script type="text/javascript"> // type is used instead of language. is declaring javascript version important? e.g: 1.1 / 1.2 / etc2

document.write("<div></div>"); // to ensure compatibility for Netscape i have to add the next line that goes...

document.write("<layer></layer>"); // does this mean i've to double the coding lines when i want to write a script?

</script>

3) When I validated my XHTML markups, most table attributes were received by the validator as error. e.g: cellspacing="" / cellpadding=""

Are there a lot of things in the normal HTML that are starting to be removed or XHTML 1.0 Strict main objective is to simplify-html-and-adore-css?

4) Is using HTML back in 1997-99 the same as HTML 4.01? What is this HTML 4.01? Are there added tags?

5) For the less popular browsers globally like Safari, Firefox, etc, do they have a lot of differences in every aspect a web designer need to know?

6) What is THE standards of web coding for HTML, CSS, and JavaScript? Is it Netscape's, I.E's, etc...

7) The last time I used Netscape was in 1998. Back then it was a painful process to launch the browser itself. Most of the websites were not viewable in Netscape. Is it still the same today? Is Netscape getting more users than before or even more than I.E?

8) What does each XHTML type gives? (1.0 Strict, 1.0 Transitional, 1.0 Frameset)

jscheuer1
09-23-2005, 04:58 AM
1 ) Essentially, in the most recent versions of IE and NS there are very few differences in javascript itself, it is more the different ways of doing things via style. It is in accommodating older versions of each browser where code becomes the most bloated with if statements and other conditional tricks.

2 ) Type is all you need or should use. Layers are for NS4, no longer used in NS6 or greater. I have NS7.2, they may be up to 8 now, not sure.

3 ) XHTML is really not the way to go, yet. HTML is still the most widely served (sent by the server) content. In almost all cases, even if your page validates as XHTML, it is being served and parsed by the browser as HTML. Yes, as far as I can tell, the trend is away from attributes and toward css property/value pairs.

4 ) I'm not up on what exactly is in the latest HTML standard but, the dates you cite are ancient by computer standards.

5 ) If you want your page to look good on these niche browsers, you should code to standards in FF or Opera and hope for the best, adding tricks to accommodate IE if needed. The latest IE will usually be compliant if you use the right DOCTYPE. The only guarantee is to test in every browser you are targeting. Generally, keep it as simple as possible and that will increase your chances of being more widely crossbrowser. BTW some folks will take issue with you lumping FF in as a 'less popular browser'. It is one but it is currently #2 and gaining.

6 ) None of the browsers get it 100% right in my opinion. If you want standards, follow the w3c.

7 ) NS7.2 is a really cool browser in my opinion, not all that widely used though and will still choke on pages that are coded with lots of older and newer IE specific stuff, if alternatives are not present.

8 ) Consult the w3c for that information or, perhaps others will chime in. I don't think there are really that many people who know all the standards. There are so many of them. It is better to learn good practices and be open to advice from those more knowledgable.

mwinter
09-26-2005, 03:37 AM
Compatibility is the overall issue, no?Assuming we're still talking about XHTML (as you're diverging, below), then yes, more-or-less. The compatibility necessary to make XHTML useful won't be around for at least five years, but more like ten. For instance, it's unlikely that Microsoft is going to include XHTML support in IE7. If they follow they're usual approach, that means it'll be around 2007/8 before an IE8, which may, or may not, support it. You then have to wait many years for users to transition to it, but given that Microsoft is neglecting operating systems prior to XP, this transition may take longer than usual.


1) How different is JavaScript for Netscape compared to JavaScript for I.E?The language itself, as implemented by modern scriptable browsers, is relatively consistent. IE hasn't implemented some built-in methods properly, but that behaviour can be detected and fixed. However, it takes an awful lot of code to do so as you're reimplementing the method from scratch in some cases.

The object model - the functions, properties, and methods - exposed by each browser can vary enormously. Even when IE does implement W3C DOM methods, it doesn't always do it properly. Opera omits style sheet manipulation except through in-line style rules. This can be a pain, but feature testing and defensive programming usually makes this a non-issue.


is declaring javascript version important [in a script element]?No. The version is irrelevant. You shouldn't encounter a browser that implements a version earlier than JavaScript 1.3 or equivalent, and in the vast majority of cases, that's sufficient. The only more recent feature that would be nice to use on a regular basis is exception handling, but it's rarely necessary.


document.write("<div></div>");When including HTML within script elements, always make sure you escape the ETAGO sequence: '</' -> '<\/'.


to ensure compatibility for Netscape i have to add [layer elements]For Netscape 4, you might. However, scripting NN4 is generally a waste of time. If your site works without client-side scripting (and it should), then it doesn't matter.


3) When I validated my XHTML markups, most table attributes were received by the validator as error. e.g: cellspacing="" / cellpadding=""Those attributes still exist in XHTML 1.0 Strict, so presumably you're using XHTML 1.1 Basic, some other DTD that doesn't include them, or there are more serious errors in your markup.


Are there a lot of things in the normal HTML that are starting to be removed or XHTML 1.0 Strict main objective is to simplify-html-and-adore-css?There have been a number of features that are considered deprecated or for backwards compatibility only, particularly those that only serve some presentational purpose. HTML 4 Strict removed some of these, and XHTML 1.0 Strict removed a few more. XHTML 1.1 Basic removes all of them, I think. So yes, the intent is to move away from presentational markup, and towards separation of style and content.

This was the intention a long time ago. CSS is not new (nor is XHTML, for that matter); it first reached Recommendation in December, 1996 but proposals have been around since 1993. Even the Recommendation milestone pre-dates the first HTML 4 draft!


4) Is using HTML back in 1997-99 the same as HTML 4.01?No. HTML 4 was in development during that period.


What is this HTML 4.01?The current version of HTML, dated 24 December 1999.


5) For the less popular browsers globally like Safari, Firefox, etc, do they have a lot of differences in every aspect a web designer need to know?They are generally more standards-oriented, so if you are familiar with how things are supposed to work, then you know just about everything you need to in that regard. The real work comes from dealing with older, buggy browsers, and IE, of course.


6) What is THE standards of web coding for HTML, CSS, and JavaScript? Is it Netscape's, I.E's, etc...None of the browser vendors hold any of the standards. The W3C (http://www.w3.org/) are responsible for HTML, CSS, DOM, and many others. JavaScript (and JScript) has been standardised by ECMA (http://www.ecma-international.org/) in ECMAScript (ECMA-262).


7) The last time I used Netscape was in 1998. Back then it was a painful process to launch the browser itself. Most of the websites were not viewable in Netscape. Is it still the same today?Netscape's recent history is a little complicated. Development of the engine was moved away from Netscape itself when the source code was released in 1998. The Mozilla Organisation rewrote it and still maintains it in the form of the Mozilla Suite (which has ended its active development cycle, as I recall) and Firefox. Netscape then used the output as the basis for its own browser (and so was always slightly behind Mozilla releases). With the arrival of Netscape 7.2, development effectively ceased with AOL disbanding its browser division. However, it has been revived in Netscape 8, which is apparently a mixture of IE and Firefox, though I've never used it.


Is Netscape getting more users than before or even more than I.E?Firefox (http://www.mozilla.org/products/firefox/) is the #2 browser now. Statistics, which were never that reliable in the first place, can really vary now. It depends on your target market. Opera (http://www.opera.com/) is usually third, with Safari (Mac) and Konqueror (KDE/Linux) coming in fourth and fifth (order again depends on audience). All are genuinely better than IE, but less popular due to the dominance of Windows.


8) What does each XHTML type gives? (1.0 Strict, 1.0 Transitional, 1.0 Frameset)You'll have to be more specific. I'm not going to rewrite the entire contents of each DTD. They are more-or-less the same as the HTML counterparts. The XHTML specification (http://www.w3.org/TR/xhtml1/) mentions some of the differences between it and HTML.

Mike

birdman
09-27-2005, 11:21 AM
Wow. Thanks for the answerS.

I'm sorry about my statement regarding FireFox's popularity. In Asia, I.E is still dominating, NS comes second. FireFox do get around these days but is still finding its way on top. I guess, that's why I'm ignorant on that part about FF's "visibility" :)

I guess I'll stop here, for now. Correct me if I'm wrong, to wrap things up... I.E is not a good platform to make things "standard". Be it JS, HTML or CSS? It seems like I have to start things from scratch once more!

tq

Twey
09-27-2005, 05:09 PM
I.E is not a good platform to make things "standard". Be it JS, HTML or CSS
This is very true. If Microsoft didn't have such a huge share of the desktop market, and hadn't "integrated" (hah) IE with Windows so it can't be forced to stop distrubuting it with its OS, no-one would use it. As such, IE is the #1 headache for web developers. Microsoft have literally created their own versions of HTML (MSHTML), Javascript (JScript) and CSS, their version of which either doesn't have a name or I have never heard the name of. These bear some resemblance to their original (standard) counterparts, but there are some quite considerable differences. Microsoft are dominant enough not to need to worry about accomodating anything but their products.

birdman
09-29-2005, 08:40 AM
1) I'm making a small script to "archive" list of names... How do I make a function that is able to highlight (or whatever indicators) related search results via keywords that even take a single letter? The names are all put in an array - CDS = new Array(); I intend to use a prompt box to search through the variables.

2) What good examples to be kept in mind to make an animated output? Example - visibility increment, color fading, free-path motions, etc... I know there are such scripts in DD but I just have to understand the basic principles to make mine! :)

TQ LOADS