Pergunta

I am using Joomla 2.5 with Mootools and a plugin (Chronoforms) to create a tabbed form.Right now I have a dropdown menu that is loading some data from the DB via PHP. I have a button that I wish could load some values depending on the value of the dropdown, so I tried:

window.addEvent('domready', function() {
    $('province_aw').addEvent('change', function() {
        document.getElementById('link1').href = "index.php?option=com_chronoforms&chronoform=listSpecific-3&id_province="+index+"&id_ch="+b;
    });
});

with this button

<a class="jcepopup" id="link1" href="javascript:void(0);" rel="{handler:'iframe'}"> <input type='button' name='prueba' id='prueba' value='...' /> </a>

The dropdown is actually changing the value of the links HREF, but it keeps opening a blank iframe everytime I click on it.

Foi útil?

Solução

The dropdown already works, it changes the button and if you right click to open the link in a new tab/window it works good.

Your problem is elsewhere, not in the code you posted. I suggest checking your jQuery script, in my console its not complete, it ends in the middle of a function, looks like a broken file. Check also the jcemediabox-popup-iframe, check for versions and opening it with simple content for debugging.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top