i suppose that you change try specifying the dataType as "script" that
your ajax calls expect:

Taken from: http://docs.jquery.com/Ajax/jQuery.ajax

dataType

The type of data that you're expecting back from the server. If none
is specified, jQuery will intelligently pass either responseXML or
responseText to your success callback, based on the MIME type of the
response. The available types (and the result passed as the first
argument to your success callback) are:

    * "xml": Returns a XML document that can be processed via jQuery.
    * "html": Returns HTML as plain text; included script tags are
evaluated when inserted in the DOM.
    * "script": Evaluates the response as JavaScript and returns it as
plain text. Disables caching unless option "cache" is used. Note: This
will turn POSTs into GETs for remote-domain requests.
    * "json": Evaluates the response as JSON and returns a JavaScript Object.
    * "jsonp": Loads in a JSON block using JSONP. Will add an extra
"?callback=?" to the end of your URL to specify the callback. (Added
in jQuery 1.2)
    * "text": A plain text string.





On Wed, Feb 18, 2009 at 1:34 AM, Tim Johnson <t...@johnsons-web.com> wrote:
>
> I have a script that generates javascript validation code when called
> in the following code:
>  $(document).ready(function(){
>        $("#dynamic_content").load(myscript,"task=entry",
>                function(resp,stat,xhr){
>                        //alert(resp);  // leave for testing
>                        }
>                );
>  });
> All of the contented rendered by 'myscript' is written to the innerHtml of
> div "dynamic_content" *except for the javascript*.
>
> I am viewing the content rendered by the script in firefox using the
> "View Formatted Source" add-on.
>
>  If I uncomment the alert() above, I see the javascript in the response.
>
> Does anyone have an answer for this mystery. Or a work-around. Any links
> to discussions on this topic?
>
> thanks
> Tim
>

Reply via email to