[Sussex] To javascript or not to javascript, that is the question (now)

Frances Fleming fay at uthink.co.uk
Mon Jul 11 23:53:01 UTC 2005


On Mon Jul 11 23:47:52 BST 2005, John D. wrote:
> I want to include a contact address (e-mail) but want to avoid
> as much of the ubiquitous spam as possible,
...
> I could just copy to provide the "mailto:"
> address with javascript, but a couple of books I have say that they
> don't like doing that as it necessitates having javascript enabled
...
> looking at the options of providing a reply form, seem a little over my
> head at the moment.
> Which do you think is correct/the best approach (by way of a little
> "straw poll")?

I agree about avoiding JavaScript for something like displaying email
addresses.

As for the alternatives for displaying your email address, electronic
collectors are aware of most of the anti-spam tricks employed and
can probably get round them.
If going for email contact, would you want it clickable to open a new
mail message, because if so, your address could be collectable.
The advantage of clickable is that you can pre-populate the subject,
body, copy and blind copy, at least in Outlook <sorry />.
But if it's to be static on the page, there's still the old image trick,
where you create it as an image. This should evade electronic
collectors. You'd have to decide whether someone who genuinely
wanted to contact you would bother to copy and paste the address.

As for which would be best (js vs. form) in any given situation, you
may have answered your own question, if you feel you're not up to
providing a form. You know you don't have to feed the submissions
into a database: you can use a plain text file instead. This works
well enough for low usage: you just script it to create a new file
each day or week and have each submission added to the end
of the file. You could get hold of a ready-made script for this.

However, I'm a dedicated database person, and I tend to prefer
form submission for site contact. It files the posts nicely, and
allows you to offer the user options, such as problem / info
required / etc, and to maybe offer one or two tiny survey questions
(don't overdo it!!) Always display a confirmation and thank you page.
You can then retrieve the results from the database into a form of
your own and check each one off as you action it, even adding
your own notes.
But I'm talking about heavier usage here, where keeping track by
email alone might be less convenient.

It might also depend on whether your users wanted to send attachments.

Have I helped?




More information about the Sussex mailing list