I have a controller code like this :
def test23() {
//params.id23 is been passed via ajax calls
def find = User.findByUsernameLike("${params.id23}")
println find
render """<script type="text/javascript"> alert("hi"); </script>"""
}
This code is called using jquery's ajax method. Well, it works well, that is , I get output printed on my console, but the render part is not working (I'm not getting the alert).
What I done is correct? Or anything else need to be passed to render those scripts?
alertor something. Or look at templating frameworks in javascript... It really depends what you're trying to achieve...idelements so that user can see it), after user selecting a value from drop-down list box :)as JSON, and deal with attaching it to the DOM client-side