ajax - neel/bong.js GitHub Wiki

#AJAXication

bong.href() is the core method for doing any kind of ajax operation. it takes two parameters bong.href(url, conf)

  • href: Specify the request location
  • conf: optional Method

href() will return an object containing several methods

  • sync(ftor, conf): Synchronous HTTP Request
  • async(ftor, conf): Asynchronous HTTP Request
  • update(dom, conf): Updates the innerHTML of dom with HTTP Response (asynchronous)
  • freezingUpdate(dom, conf): synchronous update
  • tick(ftor, interval, conf): requests in the given interval and executes ftor with the response
  • refresh(dom, interval): updates dom with interval
  • invoke(conf)
  • eval(conf): eval() the js code in HTTP Response
  • periodic(dom, interval, conf)
  • post(formDom)

**with additional ** conf ** parameter you can set the content type as ** json|xml|js|plain ** However if not specified ** Response Type is decided based on response Header methods such as eval(),update() forces the responseType