Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javascript show hide error

victorpJul 11 2006 — edited Oct 15 2006
Based on a value from my radio group, I want to either show or hide a text item. Against the radio group in the HTML Form Elements Attributes I have put<br><br>
onchange="fn_showhide(this)"
<br><br>
in my .js file I have added the following function<br><br>
function fn_showhide(itemtohide)<br>
{<br>
<br>
var item1 = document.getElementById(itemtohide).value;<br>
var el=html_GetElement(itemtohide);<br>
<br>
if (item1=='SA'){<br>
html_HideElement(el); <br>
}else{<br>
html_ShowElement(el);<br>
};<br>
}<br>
<br>
when i change the radio I get a page error (javascript) and it is something like syntax error, object expected. can anyone spot where I have gone wrong? I have looked at other examples in the forum and they look very similar so can't figure it out. thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 12 2006
Added on Jul 11 2006
22 comments
2,764 views