The next code works good..
<s:url id="remoteurl" action="jsonsample"/>
<sj:select
href="%{remoteurl}"
id="language"
onChangeTopics="reloadsecondlist"
name="language"
list="languageObjList"
listKey="myKey"
listValue="myValue"
emptyOption="true"
headerKey="-1"
headerValue="Please Select a Language"
/>
but: these code load with <s:url id="remoteurl" action="jsonsample"/>
as soon load the page... I want execute the action from javascript like this:
<div id="result" style="width: 100px; height: 100px; background-color: green;">Click me!</div>
<script type="text/javascript">
$(document).ready(function() {
$("#result").click(function() {
Here ... How execute the action "jsonsample"? and refresh in the select "language"
});
});
</script>
There is
reloadTopics
attribute in<sj:select>
tag which takes a comma delimited list of topics that will cause it to reload. Add it to your<sj:select>
tag and publish event usingpublish
function.