aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes jQuery load operation problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery load operation problems" Watch "jQuery load operation problems" New topic
Author

jQuery load operation problems

kamiya sei
Greenhorn

Joined: Dec 12, 2012
Posts: 25
Hi everyone !

Now, I'm learning the Jquery lesson , but I encountered a few problems while working with it

specific, this is my code called jquerydemo.jsp and demo_test.txt file , when I click <button>Get External Content</button> it will display the content in demo_test.txt file , but it don't display content. . however if I replace $("#div1").load("demo_test.txt") by alert("Hello world!") it display "hello world ", please show me !how to resolve this code

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Make sure that the JavaScript debugger is open in your browser and observe if the Ajax request is succeeding. I'm betting that it is not.

The URL that you are using should be server-relative, beginning with the context path. Using a page-relative URL as you are doing here is fraught with perils even if you do get it to work.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jQuery load operation problems
 
Similar Threads
Zooming Image Problem
Creating a masked popup in JavaScript
my jquery script is not executing
jQuery click function and ajaxcomplete not working.
Dynamically moving the DIV