hi there guys :) im currently working on a project with jquery...
the thing is.. i need to change the contents of a div named "sub2" with the contents of "pets.html"... i've read some tutorials and i thought the best way to do this is through the use of jquery... so here's my code...

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function contentDisp()
url : "pets.html",
success : function (data) {
} </script>

my image which is supposed to be clicked contains this

<a id="pets" onClick="contentDisp()"><img src="images/pets.png" id="pets"/></a>

the code is working ., but when i transfer my codes to netbeans with Tomcat running the code didnt work ...

is there anyone here who knows what's wrong or what should i do with my code? thanks in advance :)


It's more likely something to do with your Tomcat configuration than the javascript.

Maybe the server is not set up to respond to the .html extension.