W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2003

Re: No JavaScript for previous page and print screen

From: Matthew Smith <matt@kbc.net.au>
Date: Thu, 22 May 2003 08:19:19 +0930
Message-ID: <3ECC026F.1030404@kbc.net.au>
To: "Jordan, Alixa" <ajj9@cdc.gov>, WAI Interest Group <w3c-wai-ig@w3.org>

Hi Alixa

> Does anyone know how we can implement these functionalities without using
> JavaScript?  For example, maybe using asp?

Absolutely!  Before I had my own servers and knew any better, I used to 
create all my pages using (broken) HTML and JavaScript.  The only place 
where, for me, JavaScript still wins out over server-side scripting is 
on-screen calculators where one may change a value in a form and all 
other values re-calculate themselves.  (Form is never submitted.)

I produce all my Web material using Perl programmes; any content that 
needs to be changed sits in an SQL database (MySQL in my case) and may 
be changed by my clients using simple (and Accessible) forms.

To use your "back button example":

# We get a value from the (already defined) CGI object, $q
my $referer=$q->referer;

print "<a href='$referer' title='Return to the previous page.'
	>Back</a>";

That's it!  Any time you want to go back to the calling page, just put 
in $referer as the URI and let the server take care of it.

As regards printing, you're really stuck with the JS window.print() 
function for printing plain HTML.  However, HTML isn't the most 
print-friendly medium, nor do I believe was it designed to be.  If you 
need forms which can go to hard-copy, you can either serve them as PDF 
which you have prepared earlier or, even better, write your pages in 
XHTML and use XSLT and FO to generate PDF documents on-the-fly.  Please 
note that PDF generated this way is probably *not* Accessible, but this 
is not really relevant if we are only doing it to produce hard-copy.

I don't know how budget-concious your department is, but my 
recommendations are both free software and would be:
1) Perl - for those with a little programming knowledge
2) PHP - an Open Source alternative to ASP.

Both can "talk" to databases such as MySQL and PostgresSQL allowing the 
design of sites which may be maintained very easily, through simple HTML 
forms.

Cheers

M

-- 
Matthew Smith
IT Consultant - KBC, South Australia
KBC Web Site    http://www.kbc.net.au
PGP Public Key  http://gpg.mss.cx
Received on Wednesday, 21 May 2003 18:49:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:09 GMT