Hi All, We are using webkit and developing web based application which uses 
OPENAPI provided by various service provider. We have a javascript as given 
below test.jsfunction createEvent() { xmlhttp = new 
XMLHttpRequest();xmlhttp.open("GET", url, 
true);xmlhttp.send(null);alert("xmlhttp end"); } function eventCreated() 
{alert("xmlhttp callback"); }As i went through the webkit code and i could 
execute simple javascript which dosn't have XHR, If XHR is there then result i 
am getting is "undefined". code.cppJSValueRef 
CTestScriptAppUi::JSEvaluateScripttestscipt(JSContextRef ctx, JSStringRef 
script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, 
JSValueRef* exception){ JSLock lock;ExecState* exec = toJS(ctx);JSObject* 
jsThisObject = toJS(thisObject);UString::Rep* scriptRep = 
toJS(script);UString::Rep* sourceURLRep = sourceURL ? toJS(sourceURL) : NULL;// 
Interpreter::evaluate sets "this" to the global object if it is 
NULL//evaluate(const UString& sourceURL, i
 nt startingLineNumber, const UString& code, JSValue* thisV)//JSValue *jsval = 
new JSValue;Completion completion = 
exec>dynamicInterpreter()>evaluate(UString(sourceURLRep), startingLineNumber, 
UString(scriptRep), (JSValue *)jsThisObject);if (completion.complType() == 
Throw) {if (exception)*exception = toRef(completion.value());return 0;}if 
(completion.value())return toRef(completion.value());// happens, for example, 
when the only statement is an empty (';') statementreturn 
toRef(jsUndefined());} To establish a XHR from javascript we need a document. 
can any one help us for creating document and handling the above script. Any 
reference url or classes which i need to use. Thanks in Advance, Guru Dear 
webkitdev! Get Yourself a cool, short @in.com Email ID now!
function createEvent()
 {
 alert("start");
 var user = "username";
 var passwd = "passwd";
 var app_key = "apikey";
 
 var uiManager;
 var mainView;
 var callback = null;
 
 // Constants for menu item identifiers.
 var OPTION_CREATE_EVENT = 0;
 var OPTION_LIST_EVENT = 1;

	callback = eventCreated;
	var url = "https://www.eventbrite.com/xml/event_new?";;
	var title = "Test Event hey";
	var desc = "This is the first event created using the test widget created by Jacob Nelson";
	var start_date = "2009-06-14 10:00:00";
	var end_date = "2009-06-15 02:00:00";
	var timezone = "GMT+05";
	var status = "draft";

	url = url + "app_key="+app_key;
	url = url + "&user="+user;
	url = url + "&password="+passwd;
	url = url + "&title="+title;
	url = url + "&description="+desc;
	url = url + "&start_date="+start_date;
	url = url + "&end_date="+end_date;
	url = url + "&timezone="+timezone;
	url = url + "&status="+status;

	xmlhttp = new XMLHttpRequest();
	
	xmlhttp.open("GET", url, true);
	xmlhttp.send(null);
	alert("xmlhttp end");
 } 
 
 function eventCreated()
 {
  	alert("xmlhttp callback");
 }
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to