[REBOL] Re: Data retrieval
From: hallvard:ystad:oops-as:no at: 30-Jan-2004 19:45
Dixit Gisle Dankel (15.10 30.01.2004):
>www.tradesports.com
>Here's an example of a javascript function call in a link:
><a href="#" onClick="javascript:trade(88190);return false;">Trade This Now!</a>
>And here's the trade function:
>function trade(conID) {
> document.POSTGSX.request_operation.value = "trade";
> document.POSTGSX.request_type.value = "action";
> document.POSTGSX.selConID.value = conID;
> document.POSTGSX.location.value = "TradeCentre";
> document.POSTGSX.submit();
>}
POSTGSX is the name of a form on the web page. request_operation etc. are the different
parameters in the form. Their values are set with the javascript. You need to post something
like this to the server:
request_operation=trade
request_type=action
selConID=conID ; remark: replace this with whatever value the variable represents (i.e.
whatever number is passed to the javascript function, e.g. 88190)
location=TradeCentre
As for how to POST via the HTTP protocol, cf. http://www.w3.org/Protocols/rfc2616/rfc2616.html.