I use perl as server-side language to generate pages dynamically.
The problem is: if I use ==> $q->header(-type=>'text/html', -
charset=>'utf-8'); <==
jQuery works fluently.
But if I use ==> $q->header(-type=>'text/xml', -charset=>'utf-8'); <==
jQuery fail to do the job.
I use MathML in my pages, so I have to send http header with text/xml.
Can anyone solve the problem?
Thanks a lot.



partial html file content generated by perl:
################ html #################
<body>
<a href="#">Hello World</a>
<div id="box">How are you</div>
</body>
################ html #################

jQuery file:
################ jQuery #################
$(document).ready(function(){
        $("a").click(function(){
                $('<p id="name">peter</p>').appendTo('#box');
                if($('#name').length){
                        $('#name').show("slow");
                }else{
                        alert("It doesn't exist.");
                }
        });
});
################ jQuery #################

Reply via email to