[OT] CGI - web site help

Bernard Devlin revolution at knowledgeworks.plus.com
Mon Apr 30 02:16:58 EDT 2007


Hi Sarah,

This is possible, and should be easier than the AJAX stuff too.  What  
you need is for the javascript called by clicking on the radio button  
to change the 'form action' that is used, and then for this  
javascript to submit the form without the user clicking on any other  
control.

Here is an example of changing the form action:
http://www.mvp-wc.usace.army.mil/ftp/pub/software/web/ 
form_action_change.html

(Don't worry that the page that the above submit returns to you says  
there is a missing resource - if you look in the URL you will see  
that the cgi that was called changed).

Here is an example of submitting a form via javascript:
http://www.javascript-coder.com/javascript-form/javascript-form- 
submit.phtml

These kinds of things are what we did before all this darn new- 
fangled AJAX stuff was invented ;-)



Bernard

> what I want this AJAX stuff to do is to display a new web
> page with supplied parameters. e.g. the web page might be:
> <http://localhost/cgi-bin/catSearch.cgi?searchfor=1234&discount=0>.
> If the 5% discount radio button is clicked, I then want the page
> displayed to be
> <http://localhost/cgi-bin/catSearch.cgi?searchfor=1234&discount=5>.



More information about the use-livecode mailing list