I’d like to use a Button/link/whatever to call a xQuery function from my eXist Webapp and use the returned value to display a Bootstrap alert. So include a
<button type="button" class="btn btn-danger btn-circle">execute xQuery</button>
inside my html and if it’s clicked evaluate
let $name := "Peter"
return <div class="alert alert-success" role="alert">Hi {$name}</div>
(actually I want something more complex than this, but you get the idea..)
and return
<div class="alert alert-success" role="alert">Hi Peter</div>
inside my Page. Is this possible and if, how?
Using the Templating System does not help me here and just linking to an xQuery in my Database executes the query but redirects to another page showing the result. Can I use AJAX to evaluate the xQuery and modify the current DOM?
Thanks!
outputdiv or how the button connects with the query at all... Moreover I would like to have a fixed query in my module an call it by pressing a button. - karkraeg