Mam taki kod... Za zadanie ma otwierać okno w oknie i wczytywać do niego wykres oraz wysyłać do wykresu POST przez formularz. Niestety jak dodam "<script type='text/javascript' src='http://kazuko.pl/skorka/dwa/jquery-1.4.2.js'></script>" to skrypt kod przestaje działać. Widzi może ktoś jakiś tu błąd?
<script type='text/javascript' src='http://kazuko.pl/skorka/dwa/jquery-1.4.2.js'></script>
<link rel='stylesheet' href='http://kazuko.pl/skorka/dwa/mediaboxAdv/css/mediaboxAdvBlack21.css' type='text/css' media='screen' /> <script src='http://kazuko.pl/skorka/dwa/mediaboxAdv/js/mootools-core-1.3.2-full-compat.js' type='text/javascript'></script> <script src='http://kazuko.pl/skorka/dwa/mediaboxAdv/js/mediaboxAdv-1.3.4b.js' type='text/javascript'></script>
<script type="text/javascript"> window.addEvent('domready',function() {
$('myform').addEvent( 'submit', function(event){
// Stop the submission of the form by the normal channels
event.stop();
// Submit the form using AJAX
var myHTMLRequest = new Request.HTML(
{
url:'/wykres.php',
// When the form submission is complete...
onComplete:function(response) {
// Clear anything out of the mb_inline div
$('mb_inline').getChildren().destroy();
// Dump the response into the div
$('mb_inline').adopt(response);
// And open the div in the MediaBox
Mediabox.open('#mb_inline','Results of Submitted Form','300 200');
}
}).post($('myform'));
});
});
<form action="/wykres.php" method="post" name="myform" id="myform"> <dt>Enter your name:
</dt> <dd><input type="text" value="" name="name" id="name" /></dd> <div id="mb_inline" style="display:none;"></div>