• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: script does not work

script does not work 13 years 4 months ago #12198

  • shramovss
  • shramovss's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 1
Hello
Use your component. Thank you, very good
But there was one small problem

I want to implement one form of two scripts, as you have in your example - "Show-Hide Other radio example"

but one works fine, but another script is not working. How can I solve this problem? I give you a copy of the code:

<script type="text/javascript">
function displayField2(field)
{
if(document.getElementById('Find2').checked)
document.getElementById('helement').style.display="";

else {
document.getElementById('helement').style.display="none";
document.getElementById('FindOther').value="";
document.getElementById('component6').setAttribute("class", "formNoError");
}
}

function validateFields()
{
if(document.getElementById('Find2').checked && document.getElementById('FindOther').value == '')
{
document.getElementById('component6').setAttribute("class", "formError");
return false;
}
else
return true;
}

window.addEvent('domready', function() {
displayField2();
});
</script>
<script type="text/javascript">
function displayField3(field)
{
if(document.getElementById('exchange programs1').checked)
document.getElementById('helement1').style.display="";

else {
document.getElementById('helement1').style.display="none";
document.getElementById('FindOther1').value="";
document.getElementById('component8').setAttribute("class", "formNoError");
}
}

function validateFields()
{
if(document.getElementById('exchange programs1').checked && document.getElementById('FindOther1').value == '')
{
document.getElementById('component8').setAttribute("class", "formError");
return false;
}
else
return true;
}

window.addEvent('domready', function() {
displayField3();
});
</script>
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!