domManip causes double event binding

domManip causes double event binding


I have a pice oj javascript that is on a page to bind an event handler
to a button, somthing like:
----
<script type="text/javascript" charset="utf-8">
$(document).ready(
function() {
$("#cancelpopup").click(
function(event) {
$('#eventId')[0].value='cancelpopup';
$('#xform').submit();
}
);
}
);
</script>
---
It uses jqModal plugin, which calls domManip in this case.
domManip seems to have code in it to execute each <script> element,
which seems to cause the click event handler to get bound twice, which
means my form gest submitted twice.
My question is why does the domManip function behave this way and how
best to prevent the double binding of the click event?
Any help gratefully appreciated. I came across this issue elsewhere.
I'm using JQuery 1.2.6 in IE7.
thanks
Conor