pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Level Comment Tool - further development


From: Neil Mitchell
Subject: Re: Level Comment Tool - further development
Date: Wed, 14 Apr 2004 20:22:59 +0100

> Hi,
>
> It would be nice if you could just click on the pingus (the png's for the
> actions) to add thier names into the comment-field.
> All you have to do is this:
> include this attribute in each <img ..>-tag
> onClick="window.document.form.comment.value =
> window.document.form.comment.value + this.title"
> and name="form" to the <form ..>-tag
>
> I've testet it with Konqueror of KDE3.2 but it should be working
everywhere
> because all this is only JavaScript 1.0 which was introduced in Netscape
2.0

It's javascript 1.0, but the thing that might stop it working for some
things is the DOM support (which is pretty patchy on all browsers). The
dubious feature is probably this.title, ('this' is not guaranteed to be
anything for the caller in some versions, and title may not return anything
on old browsers) and replacing that with 'name' directly can probably be
done at the PHP level without too much hassle.

The other thing that may cause issues is that sometimes onClick doesn't work
for non-active elements, and doesn't give visual feedback (i.e. no hand
cursor), so usually its better to do <a href="javascript:codehere"><img...
/></a>, without much additional hassle and more standard nature.

Then of course, you could just slap a use a recent browser notice on it, and
use more modern stuff.

Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]