Link to home
Create AccountLog in
Avatar of aciang
aciang

asked on

javascript for Safari Browser

Dear Experts,

The code below runs perfectly in Mozilla Firefox browser. I want to know if there is equivalent code that can run in Safari browser ?
The code is about to call webservice from javascript.
In Safari, when i debug the javascript code, i notice that SOAPCall() and SOAPParameter() cause the code is not executed further. (stop/hang).

Kindly advise for any solution.

Thank you.
var strFunctionNextPage = "";
function initNetscapeWebService(strMyCustomParam1, strMyCustomParam2, strNextPage, strServicePath){
	with(document.forms[0]){
		alert("still executed");
		var soapCall = new SOAPCall(); 
		alert("not displaying any alert again");
		
		var soapVersion = 0; // version 1.1
		var nameSpace="myNameSpace";
		var transportURL;
		var methods = "createXML";
		var headers = new Array();
		
		strFunctionNextPage = strNextPage;
		transportURL = strServicePath;
		
		// SOAP params
		var param1 = new SOAPParameter(strMyCustomParam1, "strParam1", nameSpace);
		
		var param2 = new SOAPParameter(strMyCustomParam2, "strParam2", nameSpace);
		
		var myParamArray = new Array(param1,param2);
		
		soapCall.transportURI = transportURL;
		soapCall.actionURI = nameSpace +"/"+ methods;
		soapCall.encode(soapVersion, 
			methods, 
			nameSpace, 
			headers.length, 
			headers, 
			myParamArray.length, 
			myParamArray);
		
		soapCall.verifySourceHeader = true;
		if (!soapCall.verifySourceHeader)
			netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
		
		var v_strResult = soapCall.asyncInvoke(ViewResponse);
		
	}
}
 
function ViewResponse(resp,call,status)
{
    
    if(strFunctionNextPage != null && strFunctionNextPage != '')
    {
		eval(strFunctionNextPage)();
    }
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account