how to call servlet from listener event JS function?
I have two field in dialog - Pathfield / HTML5SmartImageField .
From Pathfield, i will select one page which would be having one image.
Now what i want is - once i select page from pathfield , that image will automatically rendered on my smartimagefield.
I used dialogclose listener to listen the pathfield, once the page got selected my dialogclose event listener JS would be called.
In that JS, i want to make call ajax to call servlet.
From that ajax, i would pass path of the page selected from pathfield to the servlet. In that servlet, i would manipulate that path and will get that image path from its JCR property.and then plan to return back to ajax on success.
But I dont know can i make ajax call from Listener JS?
If possible , please provide me some reference for this in which we are calling servlet in listener JS