473,287 Members | 1,741 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,287 software developers and data experts.

validate textbox value from database using ajax call

I needed to validate textbox value from database using ajax call.

i have inluded below in jsp file
Expand|Select|Wrap|Line Numbers
  1. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
i have below code in .js file

Expand|Select|Wrap|Line Numbers
  1. function validateOtherDiagCodeFromSP_WOTHERICD(num){ 
  2. alert("kinjal "+num); 
  3. var otherDiagCode = document.forms['content:ProviderSubmitClaims'].elements['content:ProviderSubmitClaims:itxEIFOtherDiagCode'+num].value;
  4.  otherDiagCode = trimAll(otherDiagCode).toUpperCase().replace(/[^a-zA-Z0-9]/g,''); //it will convert to uppercase plus replace all characters except numbers and letters
  5.  alert(otherDiagCode); 
  6. CallPageMethod("validateOtherDiagCode", success, fail,otherDiagCode); 
  7. $.ajax({ 
  8. url: "/nva/application/claims/provider/dao/ProSubmitClaimsDAO/validateOtherDiagCode",
  9.  type: "GET", 
  10. data: otherDiagCode, 
  11. dataType: 'json', 
  12. success: function(response){ 
  13. alert("response: "+response); 
  14. }, 
  15. error: function(e){ 
  16. //handle error 
  17. }); 
i am keep getting firebug error "$.ajax is not a function"

can someone please help me what is right way to do this?

thanks
Aug 10 '15 #1
1 1454
Dormilich
8,658 Expert Mod 8TB
you’re using jQuery 1.4

jQuery AJAX was added in jQuery 1.5

the current version is jQuery 1.11, resp. 2.1
Aug 10 '15 #2

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

Similar topics

1
by: ashish ranjan | last post by:
Hi there , I m in great need to know: How to select row from grid and update record in database using Ajax. u can use c#,.net and java script. Thanks in advance, Ashish Ranjan
5
by: shotokan99 | last post by:
for instance i do have this element but i dont have a <form>: <input type="Text" name="myname" id="myname" size="30"...> then i have this link: echo'<a...
3
by: kang jia | last post by:
hi, now i want to validate numeric value which user filled in in text box, it can have 2 decimal places. what is the regular expression i can use to achieve this? anyone can help? can reply me...
2
kaleeswaran
by: kaleeswaran | last post by:
hi! i want to know ..how to getting multiple rows from the database using ajax.and i pass these value to the javascript.give me solution... ...
2
by: mukeshrasm | last post by:
hello i want to display the subjects on the same page based on class selected by user. i am using dropdown for classes. so when user will select a particular class then it will display subjects in...
0
by: gopim | last post by:
hi, in my registration form having 20 fields,for this i devide this into three sections by using Multiview and views concept.it is fine but i cant get the value in "password textbox" value.how...
17
by: Shalini Bhalla | last post by:
i have 2 tables bank master and branch details having bankcode as a common feild . i have designed a form in which i am filtering branches according to a particular bank code using ajax ,...
1
by: visweswaran2830 | last post by:
Hi, I have four cascading dropdown control and now I want to load a gird data based on the value selected on that dropdown. This should be done by using ajax concepts..
1
by: Brendan Wolf | last post by:
Good Morning, I would like to validate a value entered in a textbox to make sure it matches one of the values in a table. The approach I took is a dlookup, but I can only get it to work for one of...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.