[jQuery] jquery.js and prototype.js incompatibility

[jQuery] jquery.js and prototype.js incompatibility

Hi,
out of historcal reasons i use prototype.js and jquery.js together in several
pages.
I just found a problem with event-handling: in the appended code the selectbox
is empty after selecting a value.
I believe the problem is with function handleEvent where the second loop
for (var i in handlers) {
...
}
loops over several properties - including "clear" which obviously clears my
select box. For me changing the loop to
for (var i=0; i<handlers.length; i++) {
...
works fine, but maybe there is a better solution (except from dropping
prototype.js from the project immediately ;-) )
Matthias
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="/chat/css/chat_style.css" rel="stylesheet" type="text/css">
<script language="JavaScript"
    src="/chat/static/js/prototype.js"
type="text/javascript"></script>
<script language="JavaScript"
    src="/chat/static/js/jquery.js"
type="text/javascript"></script>
<script type="text/javascript">
$(document).ready( function () {
$('#text_module').change( function(event) {
var s=$("#text_module").get(0);
    var texte=s.options[s.selectedIndex].value;
    alert(texte);
});
});
</script>
<title>Test2</title>
</head>
<body >
<h1>Test2</h1>
Try:

<select id=text_module name=text_module>
<option value=''>Empty
<option value='1'>Var1
<option value='2'>Var2
</select>

</body>
</html>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/