Hi,

I have a page that makes an Ajax request that gets a a snippet of html
that includes the following tag:
<script type="text/javascript">
  //<![CDATA[
  $j(document).ready(function() {
     alert('Hi')
  });
  //]]>
</script>

Nothing happens in this case.  However, if i change the tag to this:
<script type="text/javascript">
  //<![CDATA[
  $j(document).ready(new function() {
     alert('Hi')
  });
  //]]>
</script>

The alert happens.  Can someone please illustrate the difference, and
why the first one doesn't work?  All the examples I see of $
(document).ready never has the new in front of function.  Also, is
this the right way to call jquery from an ajax response.  The parent
doesn't necessarily know what is going on in this child, so I can't
put it in the success handler of the ajax get call.

Thanks,
Curtis

Reply via email to