Conditional display of form item based on Radio Group(without submit of it)
SumanaMar 6 2009 — edited Mar 9 2009Hi All,
I know this question has been posted many times. I have searched found solutions and tried them too, from a long time today. But I still face problems.
I have a page with a HTML Region. This has 2 items:
P1_X a radiogroup with Yes, No values.
P1_TEXT is a textbox. I have a conditional display on P1_TEXT as :P1_X = 'Y' i.e., display P1_TEXT only if P1_X is Y.
I have a onClick="javascript:go1()" function being called on P1_X.
The function is as shown below.
function go1() {
alert('in go1');
var item1 = html_RadioValue('P1_X');
alert(item1);
if (item1=='N'){
$x_HideItemRow('P1_TEXT');
//(i even tried html_HideItemRow, html_HideElement etc. I also tried AJAX for sometime too(different function)
} else {
$x_ShowItemRow('P1_TEXT');
}
}
The function go1() gets called, because i get the alert(item1) correctly. But then the P1_TEXT never gets displayed. Please help.
I am using APEX 3.1.2
I was testing on IE 7 and Firefox 3.0.7
Any suggestion welcome.
Thanks,
Sumana