[webkit-help] Executing stand alone Javascipt without HTML

Guru Prasad H B guruhb at gmail.com
Thu Jul 9 07:00:44 PDT 2009


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.js

-----------------------START---------------------------------------

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");
 }

 --------------------------END------------------------------

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 in webkit.

Thanks in Advance,
Guru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20090709/1e623a61/attachment.html>


More information about the webkit-help mailing list