Can Rev mimic http forms submit?

Pierre Sahores psahores at easynet.fr
Fri Aug 29 15:53:06 EDT 2003


Le ven 29/08/2003 à 19:21, Rob Gould a écrit :
> Can anyone tell me if the Revolution "post" command does the same
> thing as what a web-browser does when it has a "form.submit()" action?
> 
> For instance, let's say I have a form on a web-page that contains a
> form with some input fields (I've eliminated the tag characters in
> hopes that email readers won't parse this code):
> 
> 
> ----------
> form id="theForm" method="post"
> action="http://206.46.136.179/portal/vasp"
> input type="hidden" name="SERVICE" value="Login"
> input type="text" name="UserName" value="usernamehere" ID="Text1"
> taborder="1"
> input type="password" name="Password" value="abc123" ID="Password1"
> input type="button" id="Login" value="Login"
> onclick="theForm.submit();"
> form
> ---------
> 
> 
> So when the user hits the button id "Login", the theForm.submit()
> javascript action occurs, and the username/password fields are passed
> to the server.
> 
> 
> The question I have is, what is the Revolution call to do this type of
> thing?  Is it some form of the POST command?  If so, how would I
> format the post command to pass data like this?

Rev is full able to send any kind of "POST Method" formated command.

Be just carefull about setting the "httpheaders" global as needed by
your form.

You can adapt the script below as starter point.

> on testconn
>   put "ee946=941&TTF=azertyytreza" into ttest # replace with your own
> post datas
>      set httpheaders to "Content-type:
> application/x-www-form-urlencoded" & return # dont forget the space
> after the ":" char
>     post ttest to url (fld "csrecents") # your server adress
> put it # your server reply
> end testconn

Have fun !

-- 
Bien cordialement, Pierre Sahores

Inspection académique de Seine-Saint-Denis
Applications et SGBD ACID SQL (WEB et PGI)
Penser et produire "delta de rentabilité"




More information about the use-livecode mailing list