incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Frederickx <dirk.frederi...@gmail.com>
Subject Re: Implementing AJAX in JSPWiki 2.8.3
Date Sat, 13 Mar 2010 15:36:05 GMT
Simon,

JSPWiki is using mootools on the client-side i.s.o. jsonrpc.js.

You can browse the jspwiki-common.js for examples on javascript to
call and receive json rpc's.

Here is an example, used to get the progress-tracker bar for attachment uploads:


Wiki.jsonrpc.periodical(1000, this,
["progressTracker.getProgress",[progress],function(result){
			result = result.stripScripts(); //xss vulnerability
			if(!result.code)
$('progressbar').getFirst().setStyle('width',result+'%').setHTML(result+'%');
		}]);



Hope this helps,

dirk




On Wed, Mar 10, 2010 at 3:34 PM,  <Simon.Fraser@sungard.com> wrote:
> I'm trying to implement some AJAX in JSPWiki version 2.8.3 using a java
> plugin but although I can get the plugin interface to work (i.e. I can
> receive html back from the plugin to put into the page) I can't get any
> of the JSON-RPC methods to work.
>
>
>
> The error console within the browsers keep reporting that json-rpc.js
> can't be found and sure enough this doesn't exist in any of the
> downloaded files.
>
>
>
> Does anyone know how to implement AJAX in JSPWiki?
>
>
>
> Simon Fraser * Senior Developer * SunGard Securities Finance * 38th
> Floor, 25 Canada Square, London. E14 5LQ
> Tel +44 (0) 20 8081 2089 * Main +44 (0) 20 8081 2000 * Support +44 (0)
> 1483 520 170 * www.sungard.com/securitiesfinance
> <blocked::http://www.sungard.com/martini>
>
> ________________________________
>
> CONFIDENTIALITY: This email (including any attachments) may contain
> confidential, proprietary and privileged information, and unauthorized
> disclosure or use is prohibited. If you received this email in error,
> please notify the sender and delete this email from your system. Thank
> you. SunGard Apex UK Limited * Registered in England and Wales No.
> 3573008 * Registed Office: 25 Canada Square, London E14 5LQ
>
> P please don't print this e-mail unless you really need to.
>
>
>
>

Mime
View raw message