Hi everyone,
I want a div (include dropdown, textbox vs.) to be opened when I press a radio button, and when I press another radio button the corresponding div should be closed. I have tried something but nothing happens yet. The code I wrote in Generic JS View Node given below,
var body = document.getElementsByTagName('body')[0];
function ShowOrHide(){
html += '<div id="openeddiv" style="display: block"><label for="textbox"><input type="text" id="textbox" /> Opened Textbox </label></div>';
}
var html = '<span><b>Select Your Option:</span></b><br>';
html += '<label for="Option1"><input type="radio" id="Option1" name="chkPassPort" onclick="ShowOrHide()" />Option1</label><br>';
html += '<label for="Option2"><input type="radio" id="Option2" name="chkPassPort" />Option2</label><br>';
html += '<label for="Option2"><input type="radio" id="Option2" name="chkPassPort" />Option3</label>';
body.innerHTML = html;
Can you help me to build the code as I desire?
Best,