This topic is locked

Hiding a section on Add Form

9/27/2010 11:10:01 AM
PHPRunner General questions
R
rod author

Hi, I have a form on my add page that I want to block out a section on the form...I have this working for a pull-down box selection, but I wanted to also use this on a horizontal radio button selection. I have added the <TR id=GSC_hide> sections on my rows. Changing the radio button selection to a combo box pulldown, the block section works as expected.
This is my "javascript onload page" code:



//hide all rows for GSC Section unless model is GSC Review is needed

document.getElementById("hide_GSC").style.display="block";
document.forms.editform1.value_GSC_Review_Needed_1.onchange=function()

{

if(this.options[this.selectedIndex].value=='Yes') //GSC needed

{

document.getElementById("hide_GSC").style.display = "block";

document.getElementById("hide_GSC").style.display="table-row";

document.getElementById("hide_GSC1").style.display = "block";

document.getElementById("hide_GSC1").style.display="table-row";

document.getElementById("hide_GSC2").style.display = "block";

document.getElementById("hide_GSC2").style.display="table-row";

document.getElementById("hide_GSC3").style.display = "block";

document.getElementById("hide_GSC3").style.display="table-row";

document.getElementById("hide_GSC4").style.display = "block";

document.getElementById("hide_GSC4").style.display="table-row";

document.getElementById("hide_GSC5").style.display = "block";

document.getElementById("hide_GSC5").style.display="table-row";

}

else

{

document.getElementById("hide_GSC").style.display = "none";

document.getElementById("hide_GSC").style.display="none";

document.getElementById("hide_GSC1").style.display = "none";

document.getElementById("hide_GSC1").style.display="none";

document.getElementById("hide_GSC2").style.display = "none";

document.getElementById("hide_GSC2").style.display="none";

document.getElementById("hide_GSC3").style.display = "none";

document.getElementById("hide_GSC3").style.display="none";

document.getElementById("hide_GSC4").style.display = "none";

document.getElementById("hide_GSC4").style.display="none";

document.getElementById("hide_GSC5").style.display = "none";

document.getElementById("hide_GSC5").style.display="none";

}

}



Thanks

Sergey Kornilov admin 9/27/2010

Could you clarify what's the issue here?
To speed up the process post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

R
rod author 9/27/2010



Could you clarify what's the issue here?
To speed up the process post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.


The problem is that the above code does not function when using a radio button selection list for "Yes", "No".

G
giusepe9 10/13/2010

This is my "javascript onload page" code:
var ctrlCountry = Runner.getControl(pageid, 'country');

var ctrlState = Runner.getControl(pageid, 'state');

ctrlCountry.on('change', function(e){

if (this.getValue() == 'US'){

ctrlState.show();

}else{

ctrlState.hide();

}

});
or

2 in this manner "javascript onload page" code:
var ctrlStatus = Runner.getControl(pageid, '');// fieldname

function func()

{

if (ctrlStatus.getValue()=='[color="#FF0000"]U')//value

{document.getElementById("hidediv1").style.display="none";// hidediv1 <TR id=hidediv1> Deactivates row or block

//Then edit HTML code for this page on the Visual Editor tab in HTML mode

}

else

{document.getElementById("hidediv1").style.display="table-row";

}

}

;

ctrlStatus.on('click', func);
search -- --events click change in manual