Search code examples
javascriptcsshtmlprototypejs

Javascript / Prototype, a plugin for generating window panel is disallowing Javascript to be executed within it (DIV), how can I figure out the issue?


I've had a project dumped on me where I have to debug an issue with a Javascript "panel" popup that is not allowing Javascript to be executed within it. I believe the plugin being used is http://prototype-window.xilinus.com/. Its a pretty complex plugin without much documentation (made by someone who is French and I don't speak French), and Javascript is still working on the page because when I close the window it works fine (and javascript would have to be used to do this).

I'm not quite sure how to proceed as far as figuring out the issue, does anyone know of a way that this could be "disabling" javascript within that DIV?

This is how the pop-up window is being called:

        Dialog.confirm({url: "receivingPanelAjax.php?"+params,
            options: {method: 'post'}},
            {className: "mac_os_x", width:800,height:250, okLabel:"Confirm",
            overlayShowEffectOptions:{duration:0.1},
            ok:function(win){saveitem(); return false;}});

Then within the pop-up DIV, if I put anything like below won't work at all:

<script type="text/javascript">
alert('ok');
</script>

Solution

  • Most frequently "disabled" means broken. Are you using FireBug and FireQuery (or some other tools...just my preference) to diagnose what is happening when the pop-up loads?

    I would be willing to bet there is an error being thrown that is being suppressed because of the way the popup is instantiated.

    Edit: I mentioned FireQuery because I was thinking jQuery. Same principle applies...not sure if there is a "lint" type add-on for prototype, with a browser plugin that can instantiate it.