473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Why wont this AJAX method work?

I am writing an application that should query an sql server every time the application is run with parameter specified by the user. the .load() method calls for another .jsp page to be opened in a div on the main page. I believe i am calling the function correctly but it keeps giving me a null exception for the other .jsp page. The code is below and the second jsp page is stored locally with the main page.

Expand|Select|Wrap|Line Numbers
  1. jQuery("#d_results").load("Lookup_Results.jsp?date1="+date1+"&ReportType=45");
  2.  
d_results is the name of the div the div should be opened in and date1 and ReportType are parameter sent to the jsp page for the sql server query
Jul 9 '10 #1

✓ answered by acoder

If it's not the ID as mentioned, try the URL and see that you get the output you expect:

http://your-url.com/Lookup_Results.j...&ReportType=45 (replacing the date with however the date is passed).

2 1312
ifedi
60
@mcelrob5
Try:
Expand|Select|Wrap|Line Numbers
  1. jQuery("#d_results").load("Lookup_Results.jsp", "date1="+date1+"&ReportType=45"); 
  2.  
Also: did you say 'd_results' is the NAME of the div? I would think you should using the div's ID instead. This is actually more likely to be the problem.
Of course I assume you have got other things right.. like 'Lookup_Results.jsp' being the correct url address.
Cheers
Jul 9 '10 #2
acoder
16,027 Expert Mod 8TB
If it's not the ID as mentioned, try the URL and see that you get the output you expect:

http://your-url.com/Lookup_Results.j...&ReportType=45 (replacing the date with however the date is passed).
Jul 9 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Ali | last post by:
I have the following web page with a script in it. <html> <head> <title>Make Your Own Objects test</title> <script>
7
by: JM | last post by:
Hi, I transferred an AJAX application to the server to be used across the Internet. On my localhost, it works great. But when I transferred it to the server, the user control freezes for a...
0
by: ohmp05 | last post by:
Hi all, I am working on CustomSiteMapProvider that i have Derived from StaticSiteMapProvider. I have override BuildSiteMap() Method to Build Sitemap.It is working properly, But Can anyone tell...
2
by: Nobody | last post by:
I have an aspx page where I have a repeater control that repeats a asp:LinkButton. When I click on one of the links, I get a post back, and the page flashes. A friend told me to look into ATLAS/AJAX,...
2
by: Greg Scharlemann | last post by:
The last time I tried to ask this question...Google Groups screwed up my message and there was no subject (sorry for that - I know it's annoying). I'm trying to learn how to develop a plug-in...
5
by: simon | last post by:
hello, I have a server set up on my local (home) network and can not get an ajax application to run on the box. it works fine on our developement server and also works fine locally. I...
1
by: rohit189 | last post by:
I am Working on a asp.net web site. i am using visual studio.net 2008. i use some ajax control. for my web site. i use update panel on my web pages. when i run my web site on local host ajax...
0
by: Dear Java | last post by:
Hi everyone am new here, I have midterm on Monday and i wrote this method in the class but i forgat how it is work ? can any body tell me ? public void remove(int n)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.