K
Kai Grossjohann
I have two frames. Frame "search" contains a search form specifying
an onsubmit action like so:
<form ... onsubmit="foo();">
...
</form>
The other frame contains a <img ... onclick="perform_search();"> where
the perform_search function is defined as follows:
<script language="JavaScript">
function perform_search() {
var frame = parent.frames.search;
var form = frame.document.forms.mainForm;
form.submit();
}
</script>
Now, when hitting Return in the search form, then foo() is called
fine. But when clicking on the <img ... onclick="perform_search();">
in the other frame, foo() is NOT called.
Is expclicitly calling foo() from perform_search() the only way to do
it, or is there a magic incantation that might do what I want?
Kai
PS: I know, what I want is a webapp that also works without
JavaScript. But sans JavaScript, some pointily-clickety features that
are absolutely required cannot be implemented, so I need to use
JavaScript anyway...
an onsubmit action like so:
<form ... onsubmit="foo();">
...
</form>
The other frame contains a <img ... onclick="perform_search();"> where
the perform_search function is defined as follows:
<script language="JavaScript">
function perform_search() {
var frame = parent.frames.search;
var form = frame.document.forms.mainForm;
form.submit();
}
</script>
Now, when hitting Return in the search form, then foo() is called
fine. But when clicking on the <img ... onclick="perform_search();">
in the other frame, foo() is NOT called.
Is expclicitly calling foo() from perform_search() the only way to do
it, or is there a magic incantation that might do what I want?
Kai
PS: I know, what I want is a webapp that also works without
JavaScript. But sans JavaScript, some pointily-clickety features that
are absolutely required cannot be implemented, so I need to use
JavaScript anyway...