• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery.get is not working

 
joseph prabhu
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have following code




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

Regards
Joe
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your parameter list is wrong. Where's the url?
 
joseph prabhu
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post real code, and with proper indentation. What you've posted won't compile.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Load the file via HTTP. Ajax will not work properly with the file protocol.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic