JavaScript is called SOAP
Would like to have been directly JavaScrip call Xurrency.com of SOAP, the realization of the exchange rate of AJAX, to find a JavaScript SOAP Client done a test. Local on IE, Chrome successful return, firefox with the host on the error, "access to restricted URI DENIED" I do not know why his.
Decided to give up. Using php soapclient + jquery ajax to achieve.
JavaScript SOAP Client test code is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | "-//W3C//DTD XHTML 1.0 Strict//EN" <! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/1999/xhtml" lang = "en" xml : lang = "en" > <Html xmlns = "http://www.w3.org/1999/xhtml" lang = "en" xml: lang = "en"> <Head> XHTML - document </ title > <Title> XHTML - document </ title> "text/javascript" src = "soapclient.js" ></ script > <Script type = "text / javascript" src = "soapclient.js"> </ script> "text/javascript" > <Script type = "text / javascript"> function currency () ( "http://xurrency.com/servidor_soap.php" ; var url = "http://xurrency.com/servidor_soap.php"; new SOAPClientParameters ( ) ; var pl = new SOAPClientParameters (); "amount" , 5 ) ; pl. add ( "amount", 5); "base" , "usd" ) ; pl. add ( "base", "usd"); "target" , "eur" ) ; pl. add ( "target", "eur"); url , "getValue" , pl , true , Currency_callBack ) ; SOAPClient. Invoke (url, "getValue", pl, true, Currency_callBack); ) r ) { function Currency_callBack (r) ( r ) ; alert (r); ) </ Script> </ Head> <Body> "" > <Form action = ""> button value = "Invoke" onclick = "currency();" /> <Input type = button value = "Invoke" onclick = "currency ();" /> </ Form> </ Body> </ Html> |











































