Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
call webservice to get data in javascript
Old 05-03-2010, 06:15 AM call webservice to get data in javascript
Skilled Talker

Posts: 97
Trades: 0
i have a web service at this url http://196.218.16.133/onlinereservat...p=HotelsSearch

i use hotel search file with HotelSearch method and method will retrieve xml file contains the matched data.

the varialbe that i made post with it is named : HotelData

the data of the variable is a string file that contains an xml data like this
HTML Code:
<HotelsParameters>	
<CityID>388</CityID>
<UserName>admin</UserName>	
<UserPassword>admin</UserPassword>	
<DateFrom>4/12/2010</DateFrom>	
<DateTo>4/13/2010</DateTo>	
<NumberOfRooms>2</NumberOfRooms>	
<Room>		
<RoomSerial>1</RoomSerial>		
<Adults>1</Adults>		
<Child>			
<ChildSerial>1</ChildSerial>			
<ChildAge>5</ChildAge>		
</Child>	
</Room>	
<Room>		
<RoomSerial>2</RoomSerial>		
<Adults>2</Adults>		
<Child>			
<ChildSerial>1</ChildSerial>			
<ChildAge>8</ChildAge>		
</Child>	
</Room>	
<Room>		
<RoomSerial>3</RoomSerial>		
<Adults>3</Adults>		
<Child>		
</Child>	
</Room>	
<CurrencyID>162</CurrencyID>
</HotelsParameters>
i am trying to get the result by posting HotelData but i did not get the xml result file
so can anyone help me
my code is:
HTML Code:
        <script language="JavaScript">
            function InitializeService() {
                service.useService("http://196.218.16.133/onlinereservation/service.asmx?WSDL", "HotelsSearch");
            }
            var StrSearch;
            function GetAge() {
                StrSearch = document.DemoForm.StringSearch.value;

                service.HotelsSearchService.callService("HotelsSearch", StrYear);
            }
            function ShowResult() {
                alert(event.result.value);
            }
    </script>
        <form name="DemoForm">
            Hotel Name : <input type="text" name="HotelData"/><br />
            <button onclick="GetAge()">Get Age</button><br />
        </form>

the data in input filed is the previous xml file

Last edited by john_zakaria; 05-03-2010 at 06:16 AM..
john_zakaria is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-03-2010, 07:03 AM Re: call webservice to get data in javascript
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
As in this thread - the output from your link is NOT XML.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to call webservice to get data in javascript
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.72997 seconds with 12 queries