Mailing List Archive

Put your text... here and JavaScript will wipe it out
Hi list,

Two issues are rised: improving text edit box
and JavaScript to help wiping it out.

While I was working on langauge php file for Polish,
I decided to enhance the text

Put your text for the new page here.

The rationale was: the imperative tone could provoke
trolls to give a try to they creativity
and vandals to express they agression.

I've changed the text to sth that could be translated
to English as:

There is no article on that subject yet.
In this field you can enter it's first fragment.
If this wasn't your intention just press the Back button.

A bit of comment - the only valid interpretation... ;)
It's a small guide for the "tresspasser"
- first line explains the situation,
- second explains and encourages editing
- the last one clears the confusion that perhaps occured
in the "tresspassers" mind (that's _the_ "guard")

And the ratio of "light" acts of vandalism (since on Polish
Wikipedia there are no such "heavy" acts as on English)
dropped down from about 2-3 unwanted new articles per day
to 1 such article per week! (I'm still curious if that was
the reason for unwanted edits... :-)

The change provoked some users to add a kind of method
helping in wiping out the default text
- some of them are working on X-Windows - after copying an earlier
prepared article to the clipboard they mark the default text
of the textarea and unfortunately the article in the clipboard
is replaced by rubish (many forget about wiping out the box
at first)
- other would be pleased to substitute 3 step combination
as well (like eg. <leftclik>, <ctrl-a>, <del>)
with one click.

"One click is enough for all of us" as some time ago Sting sang... :-)

We propose to add the following scripts to TEXTAREA attributes

onfocus="if(this.value=='.....') {this.value='';}"
onblur="if(this.value=='') {this.value='.....';}"

where five dots should be replace by the text
returned by wfMsg("newarticletext")
this text should be posted between
<TEXTAREA> and </TEXTAREA> tags as well.

I don't know if that works on most browsers so another option
in user preferences would be a necessity.

No matter how long the text, such script makes the work
more comfortable.

Regards
Youandme


----------------------------------------------------------------------
Nowa MOTORYZACJA w portalu INTERIA.PL: aktualnosci, nowe auta, testy,
tuning, ceny, galerie, motosport... >>> http://link.interia.pl/f16bb
Re: Put your text... here and JavaScript will wipe it out [ In reply to ]
youandme@poczta.fm writes:

> "One click is enough for all of us" as some time ago Sting sang... :-)
>
> We propose to add the following scripts to TEXTAREA attributes
>
> onfocus="if(this.value=='.....') {this.value='';}"
> onblur="if(this.value=='') {this.value='.....';}"
>
> where five dots should be replace by the text
> returned by wfMsg("newarticletext")
> this text should be posted between
> <TEXTAREA> and </TEXTAREA> tags as well.

Wouldn't it be better just to set the focus to the text area field on
pageload (I just realized that WP doesn't do yet) and select the content
of the textarea if it equals the NewArticle text?

It gives absolutely the same result (one click and you can type directly
without having to delete something) and it should be more familiar to
newbies.

Can something like this be done in JavaScript? Maybe like this...change
PHP and Javascript as you like ;-)

function doOnLoad() {
// var ta = document.getElementById["wpTextbox1"];
var ta = document.forms["form"].elements["wpTextbox1"];
ta.focus();
if (ta.value == "<? wfMsg("newarticletext") ?>") {
ta.select();
}

}

greetings,
elian
--
to listen to the words of the learned, and to instill into others the
lessons of science, is better than religious exercises.
- prophet muhammad
Re: Put your text... here and JavaScript will wipe it out [ In reply to ]
On Don, 2003-01-16 at 00:09, youandme@poczta.fm wrote:

> The rationale was: the imperative tone could provoke
> trolls to give a try to they creativity
> and vandals to express they agression.

I don't think this is a big deal because even non-sysops can fix this by
replacing the nonsense with a stub article. But changing the text might
be a good idea. If we implement the FileCopy proposal, we can perhaps
also make these kind of internal texts world editable - it's all in
Language*.php after all.

Regards,

Erik
--
FOKUS - Fraunhofer Insitute for Open Communication Systems
Project BerliOS - http://www.berlios.de
Re: Put your text... here and JavaScript will wipe it out [ In reply to ]
On 16 Jan 2003 at 2:51, elian wrote:
> Wouldn't it be better just to set the focus to the text area field on
> pageload (I just realized that WP doesn't do yet) and select the
> content of the textarea if it equals the NewArticle text?
>
> It gives absolutely the same result (one click and you can type
> directly without having to delete something) and it should be more
> familiar to newbies.
>
> Can something like this be done in JavaScript? Maybe like
> this...change PHP and Javascript as you like ;-)
>
> function doOnLoad() {
> // var ta = document.getElementById["wpTextbox1"];
> var ta = document.forms["form"].elements["wpTextbox1"];
> ta.focus();
> if (ta.value == "<? wfMsg("newarticletext") ?>") {
> ta.select();
> }
>
> }

For me there's no problem. If you think that this is the most popular
way of doing thing then OK.

To be honest I have to mention that on Wikipl-l there was a second proposal
of HTML attributes version:

onfocus="if(this.value=='......') { this.value=ArtTitle; }"
onblur="if(this.value=='' || this.value == ArtTitle) { this.value='......'; }"

Youandme

----------------------------------------------------------------------
Bezplatne przelewy do ZUS i US. Tylko mBIZNES Konto.
>>> http://link.interia.pl/f16bd
Re: Put your text... here and JavaScript will wipe it out [ In reply to ]
youandme@poczta.fm wrote:

>
>While I was working on langauge php file for Polish,
>I decided to enhance the text
>
> Put your text for the new page here.
>
>The rationale was: the imperative tone could provoke
>trolls to give a try to they creativity
>and vandals to express they agression.
>
>
>

See also http://meta.wikipedia.org/wiki/Empty_page_page

>
>
Re: Put your text... here and JavaScript will wipe it out [ In reply to ]
On 16 Jan 2003 at 17:21, tarquin wrote:
> See also http://meta.wikipedia.org/wiki/Empty_page_page

On 16 Jan 2003 at 10:45, Erik Moeller wrote:
> I don't think this is a big deal because even non-sysops can fix this
> by replacing the nonsense with a stub article. But changing the text
> might be a good idea. If we implement the FileCopy proposal, we can
> perhaps also make these kind of internal texts world editable - it's
> all in Language*.php after all.

These are still theoretical (in other words potential) solutions.
If anybody suffers from texts like
"kjasf piqwekl apijasf poijasdf"
or "That's wonderful! It works!"
or "What the f*#$ is that? I want to get to know, not to write"
or stronger insults
on newly created pages, the improvement we've done
would be probably a good and _very easy_ start.
This applies to 'pedias which has still a lot of broken links
(unwriten articles). But if majority prefers to read that
and revert manually... no objections :-)

Thanks for your attention
Youandme


----------------------------------------------------------------------
Poczta nowych mozliwosci >>> http://link.interia.pl/f16bc
Re: Put your text... here and JavaScript will wipe it out [ In reply to ]
On Thu, Jan 16, 2003 at 02:51:23AM +0100, elian wrote:
> youandme@poczta.fm writes:
>
> > "One click is enough for all of us" as some time ago Sting sang... :-)
> >
> > We propose to add the following scripts to TEXTAREA attributes
> >
> > onfocus="if(this.value=='.....') {this.value='';}"
> > onblur="if(this.value=='') {this.value='.....';}"
> >
> Wouldn't it be better just to set the focus to the text area field on
> pageload (I just realized that WP doesn't do yet) and select the content
> of the textarea if it equals the NewArticle text?

No, please don't!

Using Unix or Linux, your text is automatically copied to the clipboard
when you select it, replacing the prior content of the clipboard. I often
find myself
a) select some kind of text
b) click on an edit-link
c) paste the text I had previously selected
d) delete "Put your new text here"

If the text in the edit box would be selected automatically, everything
would be messed up.

Best regards,

JeLuF