Image

Event Only Triggers Built-Ins, Not Custom Functions

Hi. I'm trying to debug a problem in a fairly complex page, that's been cobbled together out of a great many components (including third-party JavaScript snippets such as ad affiliates). I mention this just so you realize I actually don't know all of what's going on here.

Buried amidst all of this chaos, I have a form that contains <select onchange="STUFF">. Here's where the problem lies.

If "STUFF" is a standard, built-in function, like alert() or window.open() or whatever, it triggers just fine. If I write a separate, user-defined function and then call that, it fails. Nothing happens.

So <select onchange="window.open()"> gets me a new (blank) browser window. However, the following:
<script language="javascript">
function openwin() {
    window.open();
}
</script>

<select onchange="openwin()">
results in absolutely nothing happening.

Has anyone here ever seen any similar behaviour? Does anyone have any idea how to fix this?