This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes jQuery.get is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 56192
    
  13

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
joseph prabhu
Ranch Hand

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

Joined: Jan 10, 2002
Posts: 56192
    
  13

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

Joined: Nov 08, 2001
Posts: 15357
    
    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: 56192
    
  13

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: 56192
    
  13

Load the file via HTTP. Ajax will not work properly with the file protocol.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: jQuery.get is not working
 
Similar Threads
getting values from for loop
Problem with cell Editing of three columns
show database on applet
extract content from table
add and remove method