and see how it looks.
There are some great tools out there to help with finding these types of
problems. Here are a few of my favorites:
Firefox Plugins
HTML Validation - https://addons.mozilla.org/en-US/firefox/addon/249
Web Dev Tools - https://addons.mozilla.org/en-US/firefox/addon/60
Javascript Debugging - https://addons.mozilla.org/en-US/firefox/addon/1843
W3C Validators
HTML -
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Ftestmediawiki.freestandards.org%2Fen%2FMain_Page
CSS -
http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Ftestmediawiki.freestandards.org%2Fen%2FMain_Page
Articles on Cross Browser Web Development
Quirksmode - http://www.quirksmode.org/resources.html
A list Apart - http://alistapart.com/
-- Ken Snyder
From lists at frankmarion.com Fri Jun 22 18:22:18 2007
From: lists at frankmarion.com (Frank)
Date: Fri, 22 Jun 2007 19:22:18 -0400
Subject: [thelist] JS: Date.UTC woes
Message-ID: <2366CC22E5D@zeph.dnsalias.com>
Hi all,
I've function that's intended to count a span of time as X years, Y
months, Z weeks and Q days. In short, I'm basically "subtracting" a
past date from Now.
I must pass my params as such:
var now = Date.UTC(2007,5,22,0,0,0); // today
var then = Date.UTC(1967,6,24,0,0,0); // a past date
function TimeSpan(now,then) {
// stuff
}
This works fine, but I can't get the Now to be dynamic. Whipped up a
quick little function to generate the necessary string
(YYYY,MM,dd,0,0,0) that correctly returns "2007,5,22,0,0,0"
function UTCFormatNow() {
Now = new Date();
Year = calcYear(Now); // figures out the correct year in 4
digit format 'YYYY'
Month = Now.getMonth();
DoM = Now.getDate();
strFormatted = Year + ',' + Month + ',' + DoM + ',0,0,0'
strFormatted = strFormatted.toString(); // <-- redundant?
return strFormatted;
}
yet when I try to do Date.UTC(UTCFormatNow()), I get NaN.
It seems that I can't use any function or method it Date.UTC();
Can someone suggest how I can get the correct DateUTC for NOW, or how
to correctly insert the arguments needed?
Many thanks.
Frank Marion lists at frankmarion.com Keep the signal high.
From hassan.schroeder at gmail.com Fri Jun 22 18:48:36 2007
From: hassan.schroeder at gmail.com (Hassan Schroeder)
Date: Fri, 22 Jun 2007 16:48:36 -0700
Subject: [thelist] JS: Date.UTC woes
In-Reply-To: <2366CC22E5D@zeph.dnsalias.com>
References: <2366CC22E5D@zeph.dnsalias.com>
Message-ID: <4eedb92a0706221648n676e19efq9e72ca66c50f0f8f@mail.gmail.com>
On 6/22/07, Frank
wrote:
> quick little function to generate the necessary string
.. but Date.UTC() doesn't *take* a string as an argument, it takes 6
integers, so you're really rowing upstream here ... :-)
How 'bout:
var now = new Date();
alert( Date.UTC( now.getFullYear(),now.getMonth(),now.getDate(),0,0,0 ));
:: for simplicity's sake...
HTH,
--
Hassan Schroeder ------------------------ hassan.schroeder at gmail.com
From skquinn at speakeasy.net Fri Jun 22 20:18:19 2007
From: skquinn at speakeasy.net (Shawn K. Quinn)
Date: Fri, 22 Jun 2007 20:18:19 -0500
Subject: [thelist] CSS help for the Linux Foundation
In-Reply-To: <467C2EA3.2070609@northxsouth.com>
References: <467C2EA3.2070609@northxsouth.com>
Message-ID: <1182561499.4070.13.camel@afterburner>
On Fri, 2007-06-22 at 13:18 -0700, ryan wrote:
> Hello everyone, I am helping the Linux Foundation (a great consortium
> that helps Linux Torvalds and works to encourage Linux adoption in the
> enterprise market). But I am mostly a backend programmer. Recently,
> we've been trying to apply a new design from an image comp. I spent a
> lot of time making the HTML and CSS perfect, developing in Firefox.
If you haven't already, you might want to read
.
> You can see how the site is supposed to look by surfing in Firefox to
> http://testmediawiki.freestandards.org/
>
> Then I looked at the page in IE6/PC
IE6 for Windows, not IE6 for the PC. See
> and it was *completely messed up*. I upgraded to IE7 and it actually
> improved considerably, but there are still a couple widgets on the
> homepage that IE7 is moving around.
>
> I am hoping that someone here could help take a look at this page and
> give me some guidance on making this work for IE. Like I said, I'm
> mostly a backend programmer so I'm struggling to figure this out. I'm
> hoping someone here has a lot of experience with this specific problem
> and can assist me. Its for a good cause!!
I still see glitches in Firefox, namely assumptions about font size that
don't hold true in my browsing situation (11px is too small for my
browsing situations, so I override it with a larger minimum size).
Also, one should *never* do this:
{
font-size: 12px;
line-height: 14px;
}
font-size can be overridden, possibly to the equivalent of, say, 18px.
The result is unreadable (or barely readable) text because line-height
is still 14px.
--
Shawn K. Quinn
From lists at frankmarion.com Fri Jun 22 20:30:02 2007
From: lists at frankmarion.com (Frank)
Date: Fri, 22 Jun 2007 21:30:02 -0400
Subject: [thelist] JS: Date.UTC woes
In-Reply-To: <4eedb92a0706221648n676e19efq9e72ca66c50f0f8f@mail.gmail.co
m>
References: <2366CC22E5D@zeph.dnsalias.com>
<4eedb92a0706221648n676e19efq9e72ca66c50f0f8f@mail.gmail.com>
Message-ID: <2AAC6D50C3F@zeph.dnsalias.com>
At 07:48 PM 2007-06-22, you wrote:
>var now = new Date();
>alert( Date.UTC( now.getFullYear(),now.getMonth(),now.getDate(),0,0,0 ));
Frank rolls his eyes....
Oh sunomabich! Could it have been more obvious?! It worked perfectly.
Thanks Hassan.
Frank Marion lists at frankmarion.com Keep the signal high.
From beades at almonte.com Sat Jun 23 18:23:07 2007
From: beades at almonte.com (Brent Eades)
Date: Sat, 23 Jun 2007 19:23:07 -0400
Subject: [thelist] CSS help for the Linux Foundation
In-Reply-To: <467C2EA3.2070609@northxsouth.com>
References: <467C2EA3.2070609@northxsouth.com>
Message-ID: <467DAB5B.1020200@almonte.com>
ryan wrote:
> Then I looked at the page in IE6/PC and it was *completely messed up*. I
> upgraded to IE7 and it actually improved considerably, but there are
> still a couple widgets on the homepage that IE7 is moving around.
Have a look here:
http://centralbanks.org/linux/
I made a number of changes to the main stylesheet -- unfortunately, I
deleted my change log by mistake, so I can't tell you now what all I
changed. Mostly floats, and the addition of some absolute positioning
here and there.
Also, the above page doesn't resize properly; if you reduce the browser
window from full screen, the right column starts to disappear under the
other two columns. This could probably be fixed fairly easily... I just
don't have any more time to spend on it.
Anyway, if you look through 'mainb.css', hopefully you'll be able to
pick up some ideas on how to make the site work better in IE 6.
--
Brent Eades
Almonte, Ontario
http://almonte.com
From martin at easyweb.co.uk Sun Jun 24 01:14:15 2007
From: martin at easyweb.co.uk (Martin Burns)
Date: Sun, 24 Jun 2007 07:14:15 +0100
Subject: [thelist] CSS help for the Linux Foundation
In-Reply-To: <467C2EA3.2070609@northxsouth.com>
References: <467C2EA3.2070609@northxsouth.com>
Message-ID: <3AB5CF3D-DBE8-48E7-8854-A30603685A65@easyweb.co.uk>
On 22 Jun 2007, at 21:18, ryan wrote:
> You can see how the site is supposed to look by surfing in Firefox to
> http://testmediawiki.freestandards.org/
>
> Then I looked at the page in IE6/PC and it was *completely messed
> up*. I
> upgraded to IE7 and it actually improved considerably, but there are
> still a couple widgets on the homepage that IE7 is moving around.
>
> I am hoping that someone here could help take a look at this page and
> give me some guidance on making this work for IE.
Ryan
What you could do is start again from a solid base. Have a look at
http://www.positioniseverything.net/articles/pie-maker/
pagemaker_form.php
which is a really good CSS generator, with all the IE workarounds
included.
Cheers
Martin
--
> Spammers: Send me email -> yumyum at easyweb.co.uk to train my filter
> http://www.nuclearelephant.com/projects/dspam/
Sell Cloth Nappies from your website:
http://www.purpur.co.uk/announcing-purpur-associates
From evolt_org at striderweb.com Sun Jun 24 08:28:03 2007
From: evolt_org at striderweb.com (Stephen Rider)
Date: Sun, 24 Jun 2007 08:28:03 -0500
Subject: [thelist] CSS help for the Linux Foundation
In-Reply-To: <467DAB5B.1020200@almonte.com>
References: <467C2EA3.2070609@northxsouth.com> <467DAB5B.1020200@almonte.com>
Message-ID: <65B3B571-DBD5-4E01-AAC3-4B0AAEE6FF47@striderweb.com>
I hope I'm not stating the obvious, but if you have an older backup
of it, you could run diff on them to see the changes.... :)
Stephen
On Jun 23, 2007, at 6:23 PM, Brent Eades wrote:
> I made a number of changes to the main stylesheet -- unfortunately, I
> deleted my change log by mistake, so I can't tell you now what all I
> changed.
From beades at almonte.com Sun Jun 24 08:35:33 2007
From: beades at almonte.com (Brent Eades)
Date: Sun, 24 Jun 2007 09:35:33 -0400
Subject: [thelist] CSS help for the Linux Foundation
In-Reply-To: <65B3B571-DBD5-4E01-AAC3-4B0AAEE6FF47@striderweb.com>
References: <467C2EA3.2070609@northxsouth.com> <467DAB5B.1020200@almonte.com>
<65B3B571-DBD5-4E01-AAC3-4B0AAEE6FF47@striderweb.com>
Message-ID: <467E7325.9070003@almonte.com>
Well, my change log system is a little, er, informal :) It consists of
cutting and pasting my changed chunks of code into a second file. This
time I first overwrote my file with some stuff I shouldn't have, then
deleted it. So it's good and gone. Sigh... time to come up with a better
system I guess.
> I hope I'm not stating the obvious, but if you have an older backup
> of it, you could run diff on them to see the changes.... :)
>
> Stephen
>
> On Jun 23, 2007, at 6:23 PM, Brent Eades wrote:
>
>> I made a number of changes to the main stylesheet -- unfortunately, I
>> deleted my change log by mistake, so I can't tell you now what all I
>> changed.
--
Brent Eades
Almonte, Ontario
http://almonte.com
From nan at nanharbison.com Sun Jun 24 16:02:43 2007
From: nan at nanharbison.com (Nan Harbison)
Date: Sun, 24 Jun 2007 17:02:43 -0400
Subject: [thelist] DB conneection to a text box - How do they do this?
Message-ID: <20070624210257.DDC922419B@smtp2.34sp.com>
Hi All,
On the home page of: http://www.linkedin.com/
You can type in a big company or college, and the page automatically finds
that company or school name in their database (I am assuming it is a
database) and when you hit enter, it comes up with the number of LinkedIn
users from that place above the text boxes. I have never seen a db
connection to a form where you don't have to find the information in post or
get variables. I see this js function on the page:
-- script type="text/javascript"--
YAHOO.util.Event.addListener(window, "load", function() {
var acCompany = new acWidget("company", "searchString-gcs",
"http://www.linkedin.com/cs", ["company","name","count"]);
acCompany.init();
});
YAHOO.util.Event.addListener(window, "load", function() {
var acSchool = new acWidget("school", "searchString-gss",
"http://www.linkedin.com/ss", ["school","name","count"]);
acSchool.init();
});
--/script--
Can someone point me to a tutorial on the web that explains this? I can't
figure out what search terms to use to google for this. It is very cool.
Thanks,
Nan
From brian at hondaswap.com Sun Jun 24 16:10:09 2007
From: brian at hondaswap.com (Brian Cummiskey)
Date: Sun, 24 Jun 2007 17:10:09 -0400
Subject: [thelist] DB conneection to a text box - How do they do this?
In-Reply-To: <20070624210257.DDC922419B@smtp2.34sp.com>
References: <20070624210257.DDC922419B@smtp2.34sp.com>
Message-ID: <467EDDB1.1070509@hondaswap.com>
Nan Harbison wrote:
> Can someone point me to a tutorial on the web that explains this? I can't
> figure out what search terms to use to google for this. It is very cool.
>
It's js/ajax powered. The main page is actually written out from the
js includes at the top of the source with DOM scripting and
document.writes from the JS.
if you examine the rendered page with Firebug, you will see the input
fields, etc.
and so on for the rest of the page.
From anthony at baratta.com Sun Jun 24 16:09:27 2007
From: anthony at baratta.com (Anthony Baratta)
Date: Sun, 24 Jun 2007 14:09:27 -0700
Subject: [thelist] DB conneection to a text box - How do they do this?
In-Reply-To: <20070624210257.DDC922419B@smtp2.34sp.com>
References: <20070624210257.DDC922419B@smtp2.34sp.com>
Message-ID: <467EDD87.4080107@baratta.com>
Welcome to the world of AJAX.
The Yahoo AJAX Tools are here:
http://developer.yahoo.com/yui/
IBM has some nice AJAX Tutorials:
http://www.ibm.com/developerworks/web/library/wa-ajaxintro1.html
Their resource center is a good link to have:
http://www-128.ibm.com/developerworks/ajax
But you can just search google for "AJAX Tutorials" and a get a virtual
ton of links.
Nan Harbison wrote:
> Hi All,
>
> On the home page of: http://www.linkedin.com/
> You can type in a big company or college, and the page automatically finds
> that company or school name in their database (I am assuming it is a
> database) and when you hit enter, it comes up with the number of LinkedIn
> users from that place above the text boxes. I have never seen a db
> connection to a form where you don't have to find the information in post or
> get variables. I see this js function on the page:
> -- script type="text/javascript"--
>
> YAHOO.util.Event.addListener(window, "load", function() {
>
> var acCompany = new acWidget("company", "searchString-gcs",
> "http://www.linkedin.com/cs", ["company","name","count"]);
>
> acCompany.init();
>
> });
>
> YAHOO.util.Event.addListener(window, "load", function() {
>
> var acSchool = new acWidget("school", "searchString-gss",
> "http://www.linkedin.com/ss", ["school","name","count"]);
>
> acSchool.init();
>
> });
>
> --/script--
> Can someone point me to a tutorial on the web that explains this? I can't
> figure out what search terms to use to google for this. It is very cool.
> Thanks,
> Nan
From brian at hondaswap.com Sun Jun 24 20:08:19 2007
From: brian at hondaswap.com (Brian Cummiskey)
Date: Sun, 24 Jun 2007 21:08:19 -0400
Subject: [thelist] return false... but still scrolling
Message-ID: <467F1583.1000402@hondaswap.com>
I have a simple image pallette which with JS alters the select drop down.
while this code is far from unobtrusive, the option to manually select
the color from the drop down exists which makes this OK to use (the rest
of the site is horridly coded by someone else anyway.....)
i'm using a simple: IMAGE
for lack of a better idea.
this 'link' is below the fold on my resolution. but when clicked, the
page scrolls up to # (aka, the top) and also alters the URL to include
the # in it.
I thought the return false stopped this from happening? Am i missing
something obvious?
Thanks
From jonathan.snook at gmail.com Sun Jun 24 20:19:17 2007
From: jonathan.snook at gmail.com (Jonathan Snook)
Date: Sun, 24 Jun 2007 21:19:17 -0400
Subject: [thelist] return false... but still scrolling
In-Reply-To: <467F1583.1000402@hondaswap.com>
References: <467F1583.1000402@hondaswap.com>
Message-ID: <6719e3ac0706241819l59ed7a20te12f8c4682ad3ad8@mail.gmail.com>
On 6/24/07, Brian Cummiskey wrote:
> i'm using a simple: IMAGE
> for lack of a better idea.
>
> this 'link' is below the fold on my resolution. but when clicked, the
> page scrolls up to # (aka, the top) and also alters the URL to include
> the # in it.
>
> I thought the return false stopped this from happening? Am i missing
> something obvious?
If there's an error in your script, it'll stop executing the script
and in this case, never get to return false. Are you getting any JS
errors?
From brian at hondaswap.com Sun Jun 24 23:05:30 2007
From: brian at hondaswap.com (Brian Cummiskey)
Date: Mon, 25 Jun 2007 00:05:30 -0400
Subject: [thelist] return false... but still scrolling
In-Reply-To: <6719e3ac0706241819l59ed7a20te12f8c4682ad3ad8@mail.gmail.com>
References: <467F1583.1000402@hondaswap.com>
<6719e3ac0706241819l59ed7a20te12f8c4682ad3ad8@mail.gmail.com>
Message-ID: <467F3F0A.70504@hondaswap.com>
Jonathan Snook wrote:
> If there's an error in your script, it'll stop executing the script
> and in this case, never get to return false. Are you getting any JS
> errors?
>
I'm familair with that, and its the first thing i looked for.
No errors according to the FF error console or Firebug.
This is driving me nuts :(