RE: More Javascript
Home
Found the source of my problem with internet explorer, it's with
var c = obj.getAttribute('class');need to replace it with
var c = getAttribute(obj,'class');
function getAttribute( elm, aname ) {
var avalue = elm.getAttribute( aname );
if ( ! avalue ) {
for ( var i = 0; i < elm.attributes.length; i ++ ) {
var taName = elm.attributes[i].name.toLowerCase();
if ( taName == aname ) {
avalue = elm.attributes[i].value;
}
}
}
return avalue;
}
Not sure why internet explorer isn't picking up getAttribute reliably, but it's not. Had to rewrite setAttribute in a similar way too. Oh yeah, very first search result above solves things in a much smarter way...
SO, hopefully, when this page loads a script runs through it checking for posts older than your last visit (currently only logging the last time you posted), and shrinking them down. It pops some admin links into posts too, but you'd only see them if you were logged in. Source code is here, not that it's terribly useful to anyone. Known bugs right now are the multiple + and - links being attached to replies to replies, and I need to check the date of the latest reply to a post, instead of just the date of the message, and I don't really want to shrink a post down if it's the only one on a page. Probably want to leave the first post expanded if they following the rules above shrinks them all down too... It's a laugh though innit...
UPDATE: WOO, my little icons line up nicely now on my AJAX popup database selector thing that I use all over the shop... go play popex or join popex or go to add a new event to the Folkestone Gerald calendar to see it slotting neatly into place.
Inspired by this I'm off to do more AJAX!
2005 :: Comment / reply
I'm not sure (!variable) is the same as (variable!=null) is it?
Also does IE support getAttribute() as expected? You should be testing for the presence of the method if you're using DOM.
if (obj.getAttribute && (otherTests)) { // use DOM method... }
else { // do it the hard way... }
pid :: 20 Nov :: 2005 :: Comment / reply
Over to you, discussion about anything local, but please be considerate... Folkestone on TV, Kent gigs, Find a flatmate, rent a room, property queries, current news, what's new, local events, for sale, local services, what I like about Folkestone, ask questions, offer advice, plug yourself... the more it's used the more useful a resource it will become. If you want a gig listed click here to add it (fixed now!), or just click here to post a message...
Also from the same week
Some more blog posts from the same week as .
Good luck Christopher Frankland [Friday 18 November 2005]
RE: Updated Folkestone gig history [Friday 18 November 2005]
What bands did you see there Bruce, anyone good? [Saturday 19 November 2005]
Looks like he wasn't a winner [Monday 21 November 2005]
When did Richard Curtis live in Folkestone? [Monday 21 November 2005]
Folkestone under the hammer [Monday 21 November 2005]
Someone sold their house in Folkestone on Ebay [Tuesday 22 November 2005]
The Butt Of Sherry, [Wednesday 23 November 2005]
Updated Folkestone gig history [Thursday 19 February 2004]
RE: Updated Folkestone gig history [Thursday 19 February 2004]
Good work fact man! [Friday 20 February 2004]
RE: Updated Folkestone gig history [Monday 23 February 2004]
Cheers for that! [Monday 23 February 2004]
RE: Updated Folkestone gig history [Sunday 21 March 2004]
RE: Updated Folkestone gig history [Friday 26 March 2004]
RE: Updated Folkestone gig history [Tuesday 8 November 2005]
This is great, I don't suppose you have any memorabilia from that time do you? [Tuesday 8 November 2005]
Thanks for that brief but useful comment... [Thursday 24 November 2005]
RE: Updated Folkestone gig history [Sunday 17 October 2010]


