This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Sep 21, 2011, 12:24 PM
5 Posts

Radio button group and multiple file upload

  • Category: Other
  • Platform: Windows
  • Release: 8.5.1
  • Role: End user,Developer,Administrator
  • Tags: Radio group
  • Replies: 1
Hi,
 
 I would like to do the validation for the radio button group in client javascript and also need to upload mulitple files at a time. Is it possible? Please advise
Sep 21, 2011, 1:01 PM
272 Posts
Re: Radio button group and multiple file upload
Hi again,
 
for your radio button problem you could try this:
 
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

    <xp:radioGroup id="radioGroup1">
        <xp:selectItem itemLabel="1" itemValue="1"></xp:selectItem>
        <xp:selectItem itemLabel="2" itemValue="2"></xp:selectItem>
        <xp:selectItem itemLabel="3" itemValue="3"></xp:selectItem>
    <xp:eventHandler event="onclick" submit="false">
        <xp:this.script>
            <xp:executeClientScript>
                <xp:this.script><![CDATA[function getValueFromRadioButton( pID ){
        var value;
    
        try{
            var rb = document.getElementsByName( pID );
            for( var i=0; i< rb.length; i++ ){
                if( rb[i].checked == true )
                    value = rb[i].value;
            }
        }catch(e){}
    
        return value;
}

alert( getValueFromRadioButton( '#{id:radioGroup1}' ) );]]></xp:this.script>
            </xp:executeClientScript>
        </xp:this.script></xp:eventHandler></xp:radioGroup>
    

</xp:view>

 
 
Hope this helps
Sven

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal