D
David Mark
David Mark said the following on 7/23/2007 7:16 PM:
Your coding style - and the defense of it - says a lot about your
attitude about browser scripting. And the lack in your abilities of
successfully doing so.
Since you haven't posted any code at all, except for a botched re-hash
of mine, I don't think you have much to say on this subject.
It is your claim - in that "other thread" - that your code works
flawlessly whether the browser interprets the code as HTML or XHTML so
Applications I have written for both are working for both. What does
that have to do with this thread?
your claim that I don't use XHMTL (which is wrong in itself) is no
defense at all. Does your local college offer a class in public debate?
Defense of what?
If so, you should take it as you suck at it.
Never you mind what I should take.
It has nothing to do with being personal or not, the test for
document.getElementById is moronic if you think it satisfies the
requirement for knowing whether to write the style block or not.
You still don't get that do you?
It means precisely what I wrote. Can you not read plain English? The
style element doesn't have to be written for a "modern browser". Any of
the modern browsers don't need it there in order to manipulate the styles.
Which has nothing at all to do with why I wrote it.
Ok. I didn't really care at the time as it was irrelevant to me.
So it is okay to post nonsense as long as it isn't relevant to you?
You really are as inept as I thought you were. It may have been IE5.0,
IE5.5 I don't remember but it wouldn't allow you to modify a style if it
was not hard coded into the page. The way the code I wrote is written if
the browser couldn't modify it without it being hard coded then you
would have to hard code it. And to be able to - successfully -
This is "plain English?"
manipulate it then you would hard code it and the only way to hard code
it to make it gracefully degrade would be to code it as display: block.
Which you didn't do in your example. Yes, this is all quite clear.
The fact that you know nothing about that speaks volumes.
You are very hard to follow.
The only one confused on how to write cross-browser degrading code is
you. Also, it was not an "assignment" (I will leave those for your
instructor to give you), it was proof of concept to show you how inept
you are at what you claim to do for a living.
LOL. I never claimed anything about what I do for a living. Cite one
post. Inept is thinking that the length of "000" is 1. Want me to
cite that one, professor? I suspect you are still smarting from it
and that explains your attitude.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FAQ</title>
<script type="text/javascript">
function showAnswer() {
var id = this.id;
var el = document.getElementById('a' + id.substring(1));
if (el) el.style.display = (el.style.display == 'block')?'none':'block';
return false}
function windowLoad() {
var el = document.getElementById('questions')
if (el &&
el.getElementsByTagName &&
el.getElementsByTagName('a') &&
el.getElementsByTagName('dd') )
{
var links = el.getElementsByTagName('a');
var answers = el.getElementsByTagName('dd')
for (var i = links.length - 1; i >= 0; i--)
{
links.onclick = showAnswer;
links.href = '#';
If you are going to copy my code, at least copy the last version
posted.
I didn't copy "code", I copied some garbage text and modified it. There
is a difference but I doubt you would understand the difference.
links.tabIndex = 0;
if (answers.style)
{
answers.style.display = "none";
This is hardly an improvement. What you've done is make the answers
flash for a second during the page load. Furthermore, you now have
links that don't do anything if this assignment does not update the
screen (in whatever fantasy user agent you are "defending" against.)
The difference is that mine degrades, yours doesn't.
BTW, that "fantasy user agent" you keep alluding to is my cell phone
browser that supports gEBI but does not support modifying display
properties nor does it support getElementsByClassName. I know, I know,
you can't be bothered to support such devices as you don't know how.
Wrong. See below.
The only person wrong here is you. You just fail to see it is all.
No it isn't. What makes you think the space bar activates links?
Because that is precisely how I have to activate links in that "Fantasy
User Agent" you don't know how to support. The lower left key (*)
activates the "Enter key" functionality. The lower right key (#)
activates the "Space Bar" functionality and the only way to activate a
link with it is the space bar. Of which it does just fine with hard
coded links, just not dynamically created links.
"Your" example creates dynamic links just like mine. Not surprising
as it is basically mine with a couple of minor modifications.
See above.
See above.
Try again moron. The code you posted is utterly broken in the "Fantasy
User Agent" I keep telling you about but the code I posted works
flawlessly in it.
And worse in IE, Opera, etc. And why can't you name the device? I
suspect it is an old cell phone from a garage sale. Did you test with
Netscape 4 too?
Awww man, now I gotta get depressed, you have a point.
Yes. All of that bluster and your code has a worse flaw than mine.
Yes.
You'll notice I didn't insult you for the obvious gaffe. You should
take a page out of my book. Nobody respects a wise-ass.
The only flaw in my "personality" is that I think I can educate idiots
like you. Sue me for it.
There you go again. Sue you for what? I doubt you have anything I
would want.
Is that as original a name as you can call me? I have been called worse
The most fitting. And this isn't a name-calling contest any more than
it is a coding contest.
by a lot better than you. You have mistakenly assumed it was a
"contest". It isn't. It was my failed attempt to educate you as to the
flaws in your code.
Keep dreaming moron.
How many times have you used that word in this thread? You only
degrade yourself.
Yes, but not for the reasons you think. It was a waste of time on my
part to try to educate your dumb ass. Maybe someone in the future that
reads it can learn from it as you obviously can't.
"Dumb ass", "moron", etc., etc. You are stuck in a parochial rut.
I couldn't be so lucky as to not have you read my posts though as then I
could correct your non-sense babbling without having to waste my time
trying to educate you.
In English, please.
Never mind. We're done talking here.