The sample andrew gave below was correct for receiving the value of the
radio button, but it doesn't handle setting the radio selection when the
output is created.  You need to add the CHECKED keyword to the option that
is selected.

Example

<INPUT TYPE="RADIO" NAME="statut" VALUE="1" /%STATUTOUI%/>Oui
<INPUT TYPE="RADIO" NAME="statut" VALUE="2" /%STATUTNON%/>Non

Then when you are writting the html
IF STATUT='1'
UPDHTMLVAR('STATUTOUI':'CHECKED')
UPDHTMLVAR('STATUTNON':' ')
else
UPDHTMLVAR('STATUTOUI':' ')
UPDHTMLVAR('STATUTNON':'CHECKED')
endif

Kevin Rowles
Data Management
Telephone: 336-573-5020
Fax: 336-573-5001


                                                                           
             "andrew_david_ker                                             
             r"                                                            
             <andrew_david_ker                                          To 
             [EMAIL PROTECTED]>            [email protected]        
             Sent by:                                                   cc 
             [EMAIL PROTECTED]                                             
             ogroups.com                                           Subject 
                                       [Easy400Group] Re: How to recover   
                                       the value of a Radio zone           
             11/30/2005 06:20                                              
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             [EMAIL PROTECTED]                                             
                ogroups.com                                                
                                                                           
                                                                           




Hi there,

How are you validating your date? If possible you would be doing this
with client side script, and hence not 'losing' the value of the
radio zone (no CGI call in the event of a invalid date). But in the
event that you have to validate against value(s)in your db, your call
to the CGI program would return the value of the radio zone like any
other variable on your form.

Example

<INPUT TYPE="RADIO" NAME="statut" VALUE="1" >Oui
<INPUT TYPE="RADIO" NAME="statut" VALUE="2" >Non

d statut          s              1a
.
.
/free
   statut = zhbgetvar('statut');
/end-free

Only other thing to check is that the radio zone is defined within
the HTML form that does the actual call to the CGI program.

Any help?

Andrew

--- In [email protected], "lpt_fr" <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm afraid I'm asking a very basic question but I can't find the
> solution of my problem.
>
> I've got a simple form where I have to type a date and choose an
option
> proposed in a radio zone (3 choices). If I fill this form with a
wrong
> date, I re-display the form with an error message.
> My problem is that I don't know how to recover the previous value
of my
> radio zone. I've tried different ways of getting this value using
> zhbgetvar (even with multi occurences) but couldn't make it work.
>
> Could someone provide me a sample of HTML and RPG source that works?
>
> Thanks.
>






                                                            SPONSORED LINKS
                                                                   
 How to format a computer hard    Cobol programmer   Iseries 400   
 drive                                                             
                                                                   
 How to format a computer                                          
                                                                   


                            YAHOO! GROUPS LINKS

       Visit your group "Easy400Group" on the web.

       To unsubscribe from this group, send an email to:
       [EMAIL PROTECTED]

       Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/VpTY2A/lzNLAA/yQLSAA/wbFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Easy400Group/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to