Hello!
Problem with ajax.
Code of view:
An action
But when I call, partial updates are not happening.
This method:
For example:
View attachment 21
P.S.:
Plug-in installed
Thank you!
Problem with ajax.
Code of view:
HTML:
<html>
<head>
<title>Random Quote</title>
<g:javascript library="jquery"/>
</head>
<body>
<ul id="menu">
<li>
<g:remoteLink action="ajaxRandom" update="quote">
Next Quote
</g:remoteLink>
</li>
<li>
<g:link action="list">
Admin
</g:link>
</li>
</ul>
<div id="quote">
<q>${quote.content}</q>
<p>${quote.author}</p>
</div>
<div id="ajaxContainer">Nothing here.</div>
<g:remoteLink action="ajaxID" update="ajaxContainer">Обновить!</g:remoteLink>
</body>
</html>
An action
HTML:
<g:remoteLink action="ajaxRandom" update="quote">
Next Quote
</g:remoteLink>
But when I call, partial updates are not happening.
This method:
Code:
def ajaxRandom = {
def randomQuote = quoteService.getRandomQuote()
render "<q>${randomQuote.content}</q>" +
"<p>${randomQuote.author}</p>"
}
For example:
View attachment 21
P.S.:
Plug-in installed
Thank you!
Last edited: