Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, Is there a way to set the (value="") in a HTML file prior to the display. I'm using FUJITSU 6.1 COBW3 CGI routines. I'm trying to populate data fields with information prior to using COBW3_PUT_HTML. In the following I'm trying to change the input field value from 0000000 to abababa The abc.htm record contains <input type="text" name="FIELD-ID" value="0000000" size="7"> DISPLAY-HTML. SET COBW3-CNV-MODE-ADD-REP TO TRUE MOVE "FIELD-ID" TO COBW3-CNV-NAME . MOVE "abababa" TO COBW3-CNV-VALUE . CALL "COBW3_CNV_SET" USING COBW3 . MOVE "ABC.HTM" TO COBW3-HTML-FILENAME. CALL "COBW3_PUT_HTML" USING COBW3. DISPLAY-HTML-EXIT. I get the following error on the browser. COB-06105: COBW3 :A conversion name in the HTML document was not registered using COBW3_CNV_SET. please register the conversion data using COBW3_CNV_SET. Thanks in advance JIH www.pcpayroll.net
Post Follow-up to this messagejh wrote: > The abc.htm record contains > <input type="text" name="FIELD-ID" value="0000000" size="7"> > DISPLAY-HTML. > SET COBW3-CNV-MODE-ADD-REP TO TRUE > MOVE "FIELD-ID" TO COBW3-CNV-NAME . > MOVE "abababa" TO COBW3-CNV-VALUE . > CALL "COBW3_CNV_SET" USING COBW3 . > MOVE "ABC.HTM" TO COBW3-HTML-FILENAME. > CALL "COBW3_PUT_HTML" USING COBW3. > DISPLAY-HTML-EXIT. You don't use the html form field names, you need to have a special tag so that the routine can know where you want to do a text substitute. In this case the tag name must be surrounded by //COBOL// markers > <input type="text" name="FIELD-ID" value="//COBOL//ID-VALUE//COBOL//" si ze="7"> > MOVE "ID-VALUE" TO COBW3-CNV-NAME . > MOVE "abababa" TO COBW3-CNV-VALUE . Note that when the form data is returned to the program the name of this value will be the field name: FIELD-ID but on output text may be substituted anywhere, not just in field values and the stuf is just text with no special meaning to the Cobol except where the tag markers are.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.