WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WebBatch
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Why are Form Variables Empty?

Keywords: 	  form variables processing forms WebOut

Question:

The attached snippet of script is supposed to pass the values "login" and "password" to another script called login.web. Instead, the resulting url is "/webcgi/webbatch?login.web++". Why are the variables %login% and %password% in the ACTION line not being passed along? Thanks for the help.
WebOut('Content-type: text/html', 2) 
WebOut('<body bgcolor="#FFFFFF">',1)
WebOut('<p><form method="POST" ACTION="/webcgi/webbatch.exe?login.web+%login%+%password%">',1)
login=WebParamdata('T1')
password=WebParamData('T2')
WebOut('<p align="center"><img src="http://172.16.3.197/stories/Times.gif" width="575" height="70"></p>',1)
WebOut('<p><h1 align="center"><font color="#008080">State news service</font></h1>',1)
WebOut('<p>Login <input type="text" size="20" name="T1"></p>',1)
WebOut('<p>Password <input type="password" size="20" name="T2"></p>',1)
WebOut('<INPUT TYPE="SUBMIT" VALUE="Submit">',1)
WebOut('</form /body /html>',1)

Answer:

I have an inkling that you are trying to do everything in one pass. Create the form and use the variables. Does not work like that.

You have to present the form to the user somehow. (Html page, different webbatch script or maybe the same webbatch script being run with different information.

Then the user submits the information and runs the webbatch script (again?) and this time it should be able to pick up the variables.


Article ID:   W14327
Filename:   Form Variables Empty.txt
File Created: 2010:02:17:11:58:08
Last Updated: 2013:01:18:15:35:16