Rich,
All data in HTML is, by definition, "string", HTML does not not have a notion of data type = numeric.
Therefore any solution to receive an HTML var into a num var should involve error handling to 
check if if the value is a correct numerical value.   
Even when you do this this with JS in your HTML I think you should handle this in the server program.
The Test(N) in fixed format or the Monitor opcode in free format ( which I prefer ) can handle this :
 
D value           s             12A   inz('ABC')                   
D numVal          s             15S 0                              
D status          s              5S 0                              
C                   TestN                   value                02
C  N02              eval       status= %status                     
C  N02'Not numeric' dsply                                          
C/free                                                             
  monitor;                                                          
      numVal = %dec(value:15:0);                                       
  on-error;                                                         
      status = %status;                                                 
      dsply status;                                                     
  endmon;                                                          
  return;         
 
Mind you, these 2 ( TEST and MONITOR ) do not quite work the same way.
Hth,
Antoon
                                                    
  -----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of smit_al
Sent: woensdag 28 december 2005 16:49
To: [email protected]
Subject: [Easy400Group] Re: Enhancement requests

Rich,

I think it would be nice to have the zhbgetvar procedure have the
ability to convert an html variable to numeric, if the user passes a
parm to do so. 

--- In [email protected], "Rich Diedrich" <[EMAIL PROTECTED]> wrote:
>
> I really appreciate the suggestions that I have received so far, both
> on this site and through email, and I would like to repeat that this
> is a good time to let me know what you would like enhanced.  I will
> evaluate all of the suggestions (and the discussions on the
> controversial ones), and use that information to help me shape the
> enhancements and future direction of CGIDEV2. 
>
> The suggestions do not have to be specific implementation changes, but
> can include more general requests, like the one for more assistance in
> handling persistence data.
>
> Rich
>






YAHOO! GROUPS LINKS




Reply via email to