Hi,

I want to get the selected radio button value after I click an href .

I tried this in ND side as well as from JavaScript for an href and a
button. I find that the value is not caught in the case of an href
unlike clicking a button where the entire content of the form is
submitted. 

I put exactly the same code for both cases :

public int Href1_onWebEvent(CSpWebEvent event)
{

String strOprType ="";
//strOprType = getDisplayFieldValue("RadioButton1").stringValue();
CSpRadioButtonsGroup rbTestTypeOpr = (CSpRadioButtonsGroup)
getDisplayField ("RadioButton1"); 
CSpSelectable currSelected = rbTestTypeOpr.getSelected (); 
CSpValue selectedValue = currSelected.getValue (); 
strOprType = selectedValue.stringValue();

The var strOprType always have the default value of the radio button set
in the studio no matter whichever radio button is selected. But the
value comes ok for a button.


<< The following part is executed after the  javascript function "
fnRadio( ) " where a hidden variable hdRad is set       >>      

String strRad = "";     
strRad = getDisplayFieldValue("hdRad").stringValue();                   
CSpLog.send(this, CSpLog.CRITICAL, "hdRad = " + strRad);

In the studio onClick = "  document.pgOne.submit( ) " has been put in
the ExtraHTMLText for the href.

function fnRadio( )     
{
        alert("Entered function");
        var stRad = "";
        for ( i=0; i<4; i++ )
        {
                if (document.pgOne.RadioButton1[i].checked)
                    stRad=document.pgOne.RadioButton1[i].value; 
        }
        document.pgOne.hdRad.value = stRad;
        alert("hdRad = " + document.pgOne.hdRad.value);
        return true;
        
}

Again here, the value strRad does not get populated for the href case
unlike the button. 

What is the solution for the situation ??

TIA,
Deepak
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to