Hi! I have a problem with JC code. So, I'm including JavaScript Code with Load JS in Events, but this code work only when I click:"Test Form", but doesn't work in page in joomla. When I looked in source pages I saw this same JS code in test page and in site. This code:
var checkbox_id, textbox_id, checkbox, textbox, div;
/* edit the next two lines to match the ids of the elements in your form */
checkbox_id = 'checkbox';
textbox_id = 'wlasna_modlitwa';
window.addEvent('domready', function() {
checkbox = $(checkbox_id);
textbox = $(textbox_id);
div = $(textbox_id+'_container_div');
div.dissolve();
showHide();
checkbox.addEvent('click', showHide);
});
function showHide() {
if ( checkbox.checked ) {
div.reveal();
textbox.disabled = false;
} else {
div.dissolve();
textbox.value = '';
textbox.disabled = true;
}
}
This topic is locked and no more replies can be posted.
