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

calling webservice through AJAX..

13
Hi ,

Is it possible to call a webservice method through AJAX.?
If possible how can i do this?


Thanks!
Apr 5 '07 #1
5 2073
Bilwin
13
Hi friends,

Please anyone help me on this.

Thanks!
Apr 7 '07 #2
Bilwin
13
Hi,

Is it possible to invoke a java webservice method using javascript?. The call should be asynchronous.

Friends, please help me..


Thanks,
Bilwin.
Apr 8 '07 #3
acoder
16,027 Expert Mod 8TB
See this link.
Apr 9 '07 #4
acoder
16,027 Expert Mod 8TB
Threads merged because they were on the same subject.
Apr 9 '07 #5
Hi ,

Is it possible to call a webservice method through AJAX.?
If possible how can i do this?


Thanks!
Hi guy

It is possible

try with this functions

function getHTTPObject() {
var xmlhttp;

if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
}
return xmlhttp;
}


function ajaxfunction(parameter) {
var url = "../nameof the webservice file/name of the web method";
var functionname = function processimageId() {
if (http.readyState == readystateno) {
if (http.status == httpstatus) {
var exist = http.responseXML.getElementsByTagName('int')[0].childNodes[0].nodeValue;
// the output of teh webservice return to the variable exist
if( exist == 'something'){

} else {
//do something
}
}
}
}
http = getHTTPObject();
http.onreadystatechange = functionname
http.open("POST", url, true);
http.setRequestHeader("Content-Type", "type of the content")
http.send("parameter=" + escape(parameter));
}

call this ajaxfunction where ever you want.
May 3 '07 #6

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

Similar topics

0
by: Det | last post by:
Hi there I am somewhat stuck with calling a WebService from out of a VB App. My Goal: - Get a WebService invoked under MS - Access 2002, not using the MS-SOAP-Toolkit but the .net - Framework ...
3
by: Merav Orion via .NET 247 | last post by:
I have a problem calling webservice from client side javascript. The javascript call the settimeout() method. when the user press submit button it ignore the press and keep refreshing the page. it...
3
by: Henrik | last post by:
Hi all,,, I need to get a refferece to a XML-webservice, and get some data from it.... But I can't add it like an web-refference... What options does I else have?? I've been told that i've to...
2
by: Ramya A | last post by:
Hi All: I have a .NET webservice accepting an XML request document as a parameter How do I call this webservice with ServerXMLHTTP object from my VB6.0 client? I have enabled the HttpPost...
3
by: Zeez | last post by:
Hi all, I have a webpage that calls a webservice found on a remote computer. Below is the code of my webpage: ===================================== <html> <head> <script...
2
by: Frank | last post by:
Hi, Newbie wondering if it is possible to call an ASP.NET 2.0 WebService from javascript that isn't served up on the same server? For example, I would like to call the WebService using an...
2
by: oziris | last post by:
Hi, I'm under Java and I'm looking for a JavaScript framework which simplify WebService comsumption from JavaScript scriptings. I tried the great Microsoft Ajax Library but it seems strongly...
3
dj12345
by: dj12345 | last post by:
Hi, I have 2 Gridviews on my asp.net page. In this gridview i am showing list of links. I want to update these links dynamically after 5-10 seconds, without refreshing the page(without postbak) i...
1
by: xMetalDetectorx | last post by:
I am just trying to populate 1 DropDownList with values from my web service using the CascadingDropdown AJAX control. Here is my page: <%@ Page Language="C#" AutoEventWireup="true" ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.