javascript - Why doesn't the inside of jquery .get() function respond? -


I am using jquery 1.3.2 .get () method to read .txt file from a server. I am using. Currently, the method is recovering the correct file (I know this because it is logged by firebug); However, I would like to set html of a span tag to read the text from the file like this:

  drupal_add_js ('$ (document) .ready (function () {$ .get () "'. $ Path.' Templates / First_order_deck.txt"), function (data) {$ ("# embedded container") .html (data);}}); ',' Inline ');  

I'm also using Drupal 6.x as a content management system. Nothing inside the internal function ( function (data) {...} ) I have tried the console.log as well as alerts. Neither do anything, because of this I believe that my HTML is not the reason, because for this reason this code is not being reached for any reason. Then I say that the method is retrieving the file from the server. What is going wrong here? Why is there nothing inside the inner function? Could it be due to jQuery 1.3.2?

The problem was a syntax error, it should have been:

  drupal_add_js ('$ (Document) .ready (function () {$ .get ("'. $ Path. 'Templates / first_directory.txt', function (data) {$ (" # EmbeddableContainer ") .html (data);} );}); ',' Inline ');  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -