All 5 entries tagged Javascript

View all 13 entries tagged Javascript on Warwick Blogs | View entries tagged Javascript at Technorati | There are no images tagged Javascript on this blog

December 27, 2006

To–do

I have too many projects.

I started making a Tetris clone an Ancient Hobbit Puzzle game. (Sidenote: some people have too much time on their hands.)

I have plenty of work to do on Operation Meltdown.

The Beautifully Choreographed Battle Game isn’t complete.

I have various other LotH-themed games I want to make.

Perhaps more importantly than those games, I have two pieces of coursework due in at the start of next term.

Mark gave me some more Javascript stuff to do for St Pixels.

My Dad wants me to do some PHP stuff for him.

I have Babylon 5, Veronica Mars, Arrested Development and now Wonderfalls to watch.

I need to complete Twilight Princess before I go back to Warwick.

-

Grandparents were here for the past three days. We saw Treasure Island at the theatre earlier today, and yesterday we went to the ice rink, where some of us went ice-skating.

Ian has an iPod. He wanders around the house with it on all the time, ignoring people even more than before. We either need to get a remote control for it, or I’m going to get into the habit of hitting him over the head before saying anything to him.

Wandered around town last Friday for many hours with Pete and Mairead. Nowhere has any copies of Wii Play. We were unknowingly in the same Starbucks as one of Hennell’s sister’s friends for some time. We went bowling after finding a Hennell – I found that Wii Sports seems to help, but not enough to let me win. Then we went to Pizza Hut and then back into town where we met people from school. Pete and Hennell went to get a lift home and I went with them intending to get a bus, not thinking that it would make sense to tell Mairead. Hopefully she got back home alright, though.

Ian is fairly often getting up to watch the Cricket before I’ve gone to bed. It’s just wrong.


March 22, 2006

Term 1 recap – what I did

Since term 2 is over, now is the perfect time to record all the interesting events from term 1. Obviously.

My computer didn't want to connect to the internet. I sidestepped the problem for a while, before installing Ubuntu. This fixed the problem, and was generally a good thing.

At the second juggling society meeting, I met James, Jen and Darren. Jen and Darren had apparently only started juggling the previous week, which was impressive.

Early in the term, I saw Ross Noble at the Arts Centre, who was hilarious. Highlights were rewinding through most of his act on a whim, and jumping out at somebody who went to the toilet.

On Tuesday of week 3, I decided to walk into Coventry. Hilarity ensued.

The Monday runday probably occurred on a Monday, and involved two people racing to Tescos and back from L3, in the 15 minutes between lectures. Unfortunately for me, I was one of the two people, and I'm just as good at running short distances as I am at walking long distances.

At some point, the juggling trio mentioned above invited me to a Kaylee (more commonly spelt Ceilidh). Despite not really knowing what this was, and not knowing either Jen or Darren very well, I accepted enthusiastically. Well, I accepted.

I got ever so slightly lost finding it, though, in the same way that murderers ever so slightly break the law. It's a perfect subject for another Google Map Animation, but I'd need a better map to create it with. However, in the end, I got there and danced the merry night away. I believe I met Merle and Callie there, although their names almost certainly didn't stick until term 2.

I went to Sheffield one Saturday to meet up with people from Bristol. As well as playing spot the police officer, we watched Wallace and Gromit at the cinema (which has Marcus Brigstocke in the credits). On the way back, I caught a coach to Birmingham, intending to catch a train from there. This plan required my being able to find my way from the coach station to the train station, of course. After only a few minor setbacks (such as choosing entirely the wrong direction to start walking in), this was exactly what happened.

On Wednesday of week 7, I turned up to what was theoretically the first of three Perl seminars, interested in how you could cover Perl in just three hours. The turnout was somewhat amusingly low. Afterwards, I spent some time with half of the people who were there (all two of them), mostly because there was mention of working through the insanely hard Problem Sheet 3. That didn't happen all that much, though. Then I was invited to the Linux User Group meeting, where they were too cliquey, so I eventually ran away.

A week later, I went on a trip to IBM with the Computing Society. That was fun enough, but I don't think I gained anything from the experience.

On Friday of week 9, I went with a bunch of people to see Harry Potter. That was the opening night, and the cinema was ever-so-slightly busy as a result of it. So we got there early – problem solved. Except for the bit where our tickets had "AM" instead of "PM" on them. We stood around in confusion for quite a while, being given conflicting information every so often. Eventually, most of us got in, and the rest went home and came back later in the week.

I was in the latter group, which was probably for the best, since the Leeds Juggling Convention was the following day, and I needed to get up for it. I got much juggling done, and Dave tried to improve my pathetic diabolo skills (without much success). On the way back, I supplied some logic riddles and Richard supplied some word riddles.


January 10, 2006

Sleep would be a good idea.

Ah, there's nothing quite like programming until 2:30, on a project you know you'll never get round to finishing completely.

November 23, 2005

More rubbish javascript

Follow-up to An open gripe at the people behind blogbuilder's javascript from Draknek's Deprecated Devlog

While trying to add a tag to it, I managed to bump my last post on this subject to today's date. Not quite what I wanted. So the previous entry should really be my second post, on September 28th.

Today's unusability comes from the Student's Union voting page, which I'm sure large numbers of people will be visiting.

Once more, we have people trying to be very clever by opening new windows in javascript. This time, however, there's not even a good reason for it.

If someone wants to open a 300×200 pixel window, then that's a reason to use javascript. I might disagree about whether it was necessary or not, but I couldn't dispute that javascript is the way to achieve it.

If, on the other hand, someone wants to open a new, full-size window, I would have difficulty making the case for a javascript solution. Extreme difficulty.

Here is the very nice, very standard, very usable HTML solution:

<a href="URL goes here" target="_blank">Read Motion Document</a>
And here is an example link from the page (with the horrible mouseover statusbar text removed for the purposes of a fair comparison):
<a href="javascript:void(0);" onclick="javascript:Main_Win('URL goes here',
'referendum','yes'); return true;">Read Motion Document</a>

The href attribute (absolutely the most important part of the tag) contains javascript code to do nothing. And because of this, anybody who middle-clicks the link to open it in a new tab, gets a blank tab. Anybody with javascript disabled, or not using a browser with javascript support (screenreaders?), cannot open the link.

How hard would it have been to just put the URL in? Use javascript in stupid places all you like, but just don't mess with the href attribute!

There are two other silly bits to this. The first is in their code:

function Main_Win(url,name,scrollbars) {
window.open(url,name);
return true;
}

Which completely ignores the scrollbars variable.

The second just makes me wonder what whoever designed this was thinking. For each motion, there are three links: "Read Motion Document", "Read Case For", and "Read Case Against". Looking at the code, I see that the first link should open in the frame referendum, and the other two should open in the frame referendum_case.

For our purposes in this case, a frame can be thought of as just a window or tab. Opening a link in a named frame will create a new window with that identifer. If you try to open a link in a frame that is already open, then you will replace the previously open page.

This means that you can only have one of For or Against open at once. Opening one of them will replace the other. This applies across all three motions, too: all the Motion Documents will load in the same page.

For the user, this has got to be confusing. Some links open in one different window, while others load in a second different window.

(My HTML version code should really have had target="referendum", but the sensible way to open new windows is with _blank, which corresponds to a new window/tab.)

—-

Just to be fair, the Student's Union Societies section uses javascript in a very sensible fashion. Clicking on any group of societies will drop down a list of all societies in that group, but at no point is predictability lost. I can middle-click to my heart's content.

Finally, I note that it's been almost two months since I posted my BlogBuilder javascript complaint, and one of the problems I mentioned was fixed very quickly. However, the other one, which I find more annoying on a day-to-day basis, remains.

This is the code as it currently is:

<a href="javascript:showWindow('URL goes here','false',450,500,'viewComments');"
title="Read or add comments">
And this is how easy it would be to fix:
<a href="URL goes here" onclick="showWindow('URL goes here','false',450,500,
'viewComments'); return false;" title="Read or add comments">

I promise if it gets fixed I won't write any more stuff about bad javascript until next term.

(So much for an early night…)


An open gripe at the people behind blogbuilder's javascript

Seriously bad form on the javascript front.

These things need to be accessible! I spent the last several days using Mac OS 9 (for reasons I won't explain right now) and found myself completely unable to update this.

The "Create entry" link contains an acceptable drop-down menu in most browsers. For some reason, this doesn't work under Mac IE. This I don't really care about; nobody is really expected to test in Mac IE any more.

The problem is that when this drop-down menu does not appear, the link becomes pointless. There's no reason not to link it to the main "new entry" page, and some very strong accessibility arguments for doing so.

Another example of this is in the comments link at the bottom of each entry. It uses a javascript: URL to open a new window with the comments in it. Unfortunately, this means that when I try to open it in a new tab (we're back with a decent browser now), all I get is a blank window with a useless javascript URL in the address bar.

Once again, you make sure the link is accessible by making sure the URL actually goes somewhere. This means moving the javascript to where it was meant to be: the onclick event. But it means that I can middle-click to my heart's content, and anybody wandering around with javascript disabled (for whatever reason) will face no obstacle at all.

P.S. The rest of it I like.


New blog location

After a hiatus of several years, I’ve started blogging again at blog.draknek.org.

My website

Looking for more information about Alan Hazelden? Follow me on Twitter or go to my website.

June 2023

Mo Tu We Th Fr Sa Su
May |  Today  |
         1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30      

Search this blog

Blog archive

Loading…

Most recent comments

  • Knife game: No actual cutlery involved. A single player starts with the "knife" by clasping his or h… by Noyb on this entry
  • My friends and I have taken to this one very silly game lately that's probably altogether too insula… by Ian S. on this entry
  • Great, thanks for those! That first one I would know by the name of Wink Murder, usually with a sing… by on this entry
  • I don't know the names for these games, so I'll make them up: Sniper. Randomly choose who is the sin… by zep on this entry
  • I recommend checking out Project Sprouts from Luke Bayes. It makes obtaining and configuring the fla… by Duncan Beevers on this entry

Tags

RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder
© MMXXIII