kjhgfdfsdf
On Mar 15, 3:12 am, Foreigner <foreigne...@gmail.com> wrote: > Hi, > I'm trying to use jQuery to get some HTML with Javascript usingAJAX. > My response gets inserted into the contentDiv element but my > javascript inside the response doesn't get executed as the > documentation says (http://docs.jquery.com/ > Specifying_the_Data_Type_for_AJAX_Requests). > > Here goes my function withAJAXcall: > > function loadHtml(obj) > { > if(obj.className == "menuItem") > { > $.ajax({ > type:"GET", > url:"content/" + obj.id + ".html", > dataType: "html", > success: > function(data, status) > { > contentDiv.innerHTML = data; > } > }); > } > > } > > My response looks like: > > <h3>Some heading</h3> > <script type="text/javascript"> > > //Some javascript code > > </script>