http://qs321.pair.com?node_id=68973


in reply to Executing CGI script via Javascript

Slightly off-topic (wot no perl), but I'm sure someone can make use of this.

I've written a couple of Javscript modules (with API-like interfaces) that might be useful to cgi guys. In particular there's one called query.js which implements a Query class; this lets you interact and code with the query string using three or four simple commands, eg:
var query = new Query(document.location.search); var names = query.getNames(); var pName = document.forms[0].pName.value; var pValue = document.forms[0].pValue.value; query.addParameter(pName, pValue); alert(query.toQueryString());
Using this interface makes it a lot easier to collect parameters and hit a cgi script. It also makes it easy to send data from one webpage to the next (so forms can be spread over two pages, for example).

This script is online at www.javascriptguru.co.uk (along with examples) if you're interested.

willdooUK
--------------