Having a problem with g:formRemote tag, can't update div
Hi
I am new to grails and try to learn g:formRemote tag.
I am using latest grails. I have a simple following page. I have jquery1.7.2 library in a same folder.
When I submit form, it open page in a new window, instead of opening in a div "comboDiv22244".
Code:
<!doctype html>
<html>
<head>
<title>Toggle Div Page</title>
<meta name="layout" content="main">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'errors.css')}" type="text/css">
<g:javascript library="jquery" plugin="jquery1.7.2"/>
</head>
<body>
<div>
<div>
<h1>Combobox AJAX Testing............</h1>
<g:formRemote name="myForm" update="comboDiv22244" url="[controller: 'toggleDivPage', action: 'showComboResponse']">
<select id="servicesoffered" name="servicesoffered" onchange="submit()" />
<option value="blank">Please choose a type of service</option>
<option value="1">Option A</option>
<option value="2">Option B</option>
<option value="3">Option C</option>
</select>
</g:formRemote>
<div id="comboDiv22244">
==========Combo response page goes here main=========
</div>
</div>
</div>
</body>
</html>
Please can someone adive me or can someone provide working example.
Thanks