if the link was created by event , the result will show in window.
if the link was created before onload , the result will show in tagets.
what is dojo doing in onLoad?
test operation:
click 'add event link' --> 'it is a insert link on click' show in window
click 'it is a insert link before onload' or 'it is a hard-coding link' show in tagets.
test Code:
<a herf="#" onclick="return doInsertLink()" >add event link </a><br/><br/>
<a dojoType="struts:BindAnchor" id="codeId" href="/showcase/nodecorate/panel1.action" theme="ajax" targets="divId" showError="true">it is a hard-coding link</a><br/>
<s:div id='divId'></s:div>
<script>
// Insertion is from prototype.js
new Insertion.Before("divId",'<a dojoType="struts:BindAnchor" id="insertId" href="/showcase/nodecorate/panel1.action" targets="divId" theme="ajax" showError="true">it is a insert link before onload </a><br/><br/>');
function doInsertLink(){
new Insertion.Before("divId",'<a dojoType="struts:BindAnchor" id="insertOnclickId" href="/showcase/nodecorate/panel1.action" targets="divId" theme="ajax" showError="true">it is a insert link on click </a><br/>');
}
//doInsertLink();
</script>
