I don't have a definite answer, but just keep in mind that:
- The Dojo plugin is deprecated, you might want to consider other ways
of achieving the same thing.
- For the ajax tags to work you have to include the head tag ( <sx:head/> ).
Please read:
http://struts.apache.org/2.x/docs/ajax-tags.html
http://struts.apache.org/2.x/docs/dojo-head.html
http://struts.apache.org/2.x/docs/ajax.html
SudhirJava, 17-09-2010 06:44:
Hi,
Please help me in the following issue.
I have gone throgh some threads which have explained the same problem.
But not able to solve this.
So I need your help on this.
Please provide me if you know the solution is explained clearly.
I apoloigize if this a duplicate thread.
The issue in Javascript is not working in the included page in sx:div.
Below is the code
In certification.jsp if I click on Edit link it is not calling the
javascript function editCertification()
I am using struts2-dojo-plugin-2.1.8.1.jar
struts2-core-2.1.8.1.jar
welcome.jsp
------------------
<sx:div id="two" label="Tab 2" href="certificationLink.action"
preload="false" executeScripts="true" separateScripts="false"> </sx:div>
struts.xml
--------------
<action name="certificationLink"
class="com.lnt.pms.action.AddDeleteCertificationAction"> <result
name="success">/pages/certification.jsp</result> </action>
certification.jsp
---------------------
<script>
function editCertification(userCertificationId){
var url =
"editCertification.action?certificationId="+userCertificationId;
var myAjax = new Ajax.Request(
url,
{
method: 'post',
onComplete: fetchSuccess
}
}
function fetchSuccess(originalRequest){
var result = originalRequest.responseText.evalJSON();
document.getElementById("certificationName").value=result.certificationList[0].certificationName;
}
</script>
<td class="nowrap"><s:set id="userCertificationId"
value="userCertificationId" />
<s:a
href="javascript:editCertification('%{userCertificationId}')"
theme="xhtml">Edit</s:a>
</td>
Regards
Sudhir
sudhi...@...
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]