•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 402,468 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,943 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 987 | Replies: 6
![]() |
•
•
Join Date: Oct 2007
Posts: 22
Reputation:
Rep Power: 1
Solved Threads: 0
Hi all,
I am in the process of creating a web page.The page consists of a form where it will ask the users to give the input values(all values in integers).Those values should be passed and the values should be calculated.
I have the wsdl file from the client.I need to invoke the wsdl file using java script.Once it is invoked,calculation will be done and the results will be sent back.Our job is to capture those results from the clients and display it in the same web page.
I am planning it to do this using AJAX..But I dont how and where to start..Can anyone give the way how to do this requirement?
Regards
dave.
I am in the process of creating a web page.The page consists of a form where it will ask the users to give the input values(all values in integers).Those values should be passed and the values should be calculated.
I have the wsdl file from the client.I need to invoke the wsdl file using java script.Once it is invoked,calculation will be done and the results will be sent back.Our job is to capture those results from the clients and display it in the same web page.
I am planning it to do this using AJAX..But I dont how and where to start..Can anyone give the way how to do this requirement?
Regards
dave.
•
•
Join Date: Jan 2006
Posts: 13
Reputation:
Rep Power: 3
Solved Threads: 1
Hi, Dave.
To make calculations and display the results in the same page without reloading you don't need to use AJAX. It's really unnecessary for what the job requires. I'm assuming you have all the values stored in variables from your wsdl file.
First make a division in your HTML called "result" or something like that. Then make a button with an onclick event executing your Javascript function. Let's say you need to calculate the sum of two variables. Here's how you could do it:
The sum will be sent to the "result" division.
I hope that helps!
To make calculations and display the results in the same page without reloading you don't need to use AJAX. It's really unnecessary for what the job requires. I'm assuming you have all the values stored in variables from your wsdl file.
First make a division in your HTML called "result" or something like that. Then make a button with an onclick event executing your Javascript function. Let's say you need to calculate the sum of two variables. Here's how you could do it:
html Syntax (Toggle Plain Text)
<form> <input type="text" id="x" /> <input type="text" id="y" /> <input type="button" onclick="getSum(x.value,y.value)" /> <div id="result"></div> </form>
javascript Syntax (Toggle Plain Text)
function getSum(x, y) { var sum = x + y; document.getElementById("result").innerHTML = sum; }
The sum will be sent to the "result" division.
I hope that helps!
•
•
•
•
Hi all,
I am in the process of creating a web page.The page consists of a form where it will ask the users to give the input values(all values in integers).Those values should be passed and the values should be calculated.
I have the wsdl file from the client.I need to invoke the wsdl file using java script.Once it is invoked,calculation will be done and the results will be sent back.Our job is to capture those results from the clients and display it in the same web page.
I am planning it to do this using AJAX..But I dont how and where to start..Can anyone give the way how to do this requirement?
Regards
dave.
Are you trying to figure out how to use the WSDL file to discover an exposed service and make use of it?
Or is the the actual performing of the AJAX requests what you want to figure out?
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
•
•
Join Date: Oct 2007
Posts: 22
Reputation:
Rep Power: 1
Solved Threads: 0
•
•
•
•
Are you trying to figure out how to use the WSDL file to discover an exposed service and make use of it?
Or is the the actual performing of the AJAX requests what you want to figure out?
Am trying to use the wsdl file and make us of the web service...I can use any technology..no compulsion to use ajax...But the invocation of the wsdl should be simple using java script or plain html...I can't go for jsp,servlets.Thats why i chose ajax.
Last edited by dave_nithis : Jun 18th, 2008 at 1:19 am.
•
•
Join Date: Aug 2006
Location: Noida, India
Posts: 157
Reputation:
Rep Power: 3
Solved Threads: 16
•
•
Join Date: Oct 2007
Posts: 22
Reputation:
Rep Power: 1
Solved Threads: 0
•
•
•
•
When u donot need to go the server, then there is no concept of Ajax here. Ajax is used to send request to the server and get response back to the client.
yeah...That I know..My question is can we do the request using the wsdl file alone without contacting the server?
I tried with ajax and it is working..but i have given the path like this:
req.open('GET','http://trial.serviceobjects.com/fw/FastWeather.asmx/GetFiveDayForecastByZip?Zip=33909&LicenseKey=WS14-APN1-TIH4',true);Note:The service is a free service that I got from internet.
Here I have not used the wsdl file.But I am given with only the wsdl file.My client have not given the whole url...So am messed up here..
Regards
Dave.
Last edited by peter_budo : Jun 20th, 2008 at 8:16 am. Reason: Keep It Organized - please use [code] tags
•
•
•
•
yeah...That I know..My question is can we do the request using the wsdl file alone without contacting the server?
I tried with ajax and it is working..but i have given the path like this:
req.open('GET','http://trial.serviceobjects.com/fw/FastWeather.asmx/GetFiveDayForecastByZip?Zip=33909&LicenseKey=WS14-APN1-TIH4',true);
Note:The service is a free service that I got from internet.
Here I have not used the wsdl file.But I am given with only the wsdl file.My client have not given the whole url...So am messed up here..
Regards
Dave.
Normally XMLHttpRequest (XHR) can only be made to the same host.
Cross domain is only possible if the web service (remote host) implements it. Either using a workaround such as cookies, url fragments, google gears etc. or the standard way http://www.w3.org/TR/access-control/ - which is not supported by majority of browsers however.
The easiest way to do cross-domain XHR is to proxy the remote domain through your server serving the HTML. You can also proxy the XML file to another remote domain, and have the remote domain return it to your document as JavaScript, since you can include JS from a remote domain without any problems.
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- AJAX & PHP Developer ( Full Time ) (Web Development Job Offers)
- AJAX : Am i right with the concept? (JavaScript / DHTML / AJAX)
- New Ajax Tutorial (IT Technologies and Trends)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Javascript timer problem
- Next Thread: Random Images on Refresh


Linear Mode