Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding radio buttons to a html page produced via cobol

Status
Not open for further replies.

foxuk

Technical User
Aug 30, 2002
2
0
0
GB
Hi everyone.

I've got a cobol program that creates a html page from within the COBOL code. Part of the definition of the HTML code goes like this:

<FORM NAME=HTMLForm METHOD=POST>

So as you can see there's no actual program that this form points to even though the METHOD has been set to &quot;POST&quot; (as in sending data from this html page to a server side program).

However the html page does work fine, because if the cobol program is run, the html page is generated and I'm able to click on a &quot;submit&quot; button which then goes back into the COBOL program and carries on with the rest of it's job.

I want to add 3 radio buttons to the html page so that one of them is selected before the &quot;submit&quot; button is pressed.

The problem is I'm not quite sure where to start, and where I'd need to add new code into the COBOL program.

I did have a manually written html page with radio buttons (created using a little javascript) but I'm not sure how to insert this into the COBOL program and how to link the html code to the COBOL.

For example, how to make the cobol see which radio button was pressed,and then running a dos batch file is run with a specific parameter based on that outcome before carrying on with the rest of the COBOL program.

Any ideas would be more than welcome.

Thanks a lot.
 
The program probably outputs some HTML, calls the browser and then a cookie is created. When control returns to the COBOL program the cookie is read and interpreted. In general you have to insert more code in the HTML that is output and add to the cookie logic and then add code to interpret the input from the radio buttons.

Without seeing the program it is difficult to help you. Maybe you should post the code. Clive
 
I wonder if maybe you need to go back to the original tool that created the html and linked it in to the COBOL program? I use MicroFocus NetExpress, and have played a little with web enabled applications - having created the html and screen using NetExpress I would then go back to NetExpress to modify it.

Phil.
 
This might just be simple javascript you have to know to write the program. Javascript is just text like html and the browswer interprets what to do. If you do not like my post feel free to point out your opinion or my errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top