aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes jQuery.get is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery.get is not working" Watch "jQuery.get is not working" New topic
Author

jQuery.get is not working

joseph prabhu
Ranch Hand

Joined: Feb 26, 2008
Posts: 162
I have following code




This get method is not calling when i call from html.

Regards
Joe
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61657
    
  67

Your parameter list is wrong. Where's the url?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
joseph prabhu
Ranch Hand

Joined: Feb 26, 2008
Posts: 162
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61657
    
  67

Please post real code, and with proper indentation. What you've posted won't compile.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Guessing since there is a lack of details.

Is the page running in https? http to https runs into problems with the same origin policy.
joseph prabhu
Ranch Hand

Joined: Feb 26, 2008
Posts: 162
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61657
    
  67

So what's the problem? Keeping us guessing isn't going to help you much.

Have you used Firebug or other debugger to see what the request is actually doing?
joseph prabhu
Ranch Hand

Joined: Feb 26, 2008
Posts: 162
What i am doing , i have written an html file in my local desktop(not hosted in any server). In the html head in have included remote .do in the head



so in the html i have included the search autocomplete from remote site in the head . when i do searching the server responds with data in server log. But the respond is not painting as css which is present there.

But when i hit the URL directly https://devlopenvironment/project/index.do and search autocomplete is working.

when i debug the code i found that the following code (the body of jQuery.get body is not executing)

jQuery.get(constructURL(q), function(data) {
getData(q, data ); });

Can you help Now.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61657
    
  67

Load the file via HTTP. Ajax will not work properly with the file protocol.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jQuery.get is not working