Thanks for all your support, after adding the sx:head i could able to work. But the problem is , while loading the jsp page itslef the url action is calling. Actually our intention to call the url , when the onchange of the text field happens. why it is happening like this? I am attaching my jsp with this. <%@ page contentType="text/html; charset=UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="sx" uri="/struts-dojo-tags"%> <%String relPath=request.getContextPath(); %> <html:html locale="true"> <sx:head parseContent="true" /> <head> <title>Add Demand</title> <link href="<%=relPath%>/css/mystyle.css" rel="stylesheet" type="text/css" /> <link href="<%=relPath%>/css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css"> html,body { height: 100%; } </style> <script type="text/javascript" src="<%=relPath%>/js/addDemand.js"></script> </head> <script> function show_details() { alert('in show details11........'); dojo.event.topic.publish("show_detail"); } </script> <body> <s:form action="AddDemand" onsubmit="return validate(this);" id="frmDemand"> <s:url id="d_url" action="chkDemandCompany" /> <s:hidden name="sessionVal"></s:hidden> <jsp:include page="date.jsp" /> <div> <p class="breadcrump" align="left">Demand Company -> Add Demand</p> </div> <br> <div class="container1"> <div class="header" align="left">Demand Company Details</div> <table width="100%" align="left"> <tr></tr> <tr></tr> <tr> <s:textfield name="demandCompanyName" label="Company Name 12" required="true" size="35" onchange="show_details()" ></s:textfield> <sx:div showLoadingText="false" id="details" href="%{#d_url}" listenTopics="show_detail" formId="frmDemand"></sx:div> </tr> <tr></tr> <s:select label="Company Type" list="{'GDS','IDS'}" name="demandCompanyType" required="true" /> <tr></tr> <tr> <td><s:textfield name="demandCompanyUrl" label="URL for the company" required="true" size="35"></s:textfield></td> </tr> <tr></tr> <tr> <s:select label="Message Type" list="{'OTA','XML 4'}" name="demandMessageType" required="true" /> </tr> <tr> <td><br> <br> </td> </tr> <tr> <td><input type="submit" value="Save" name="Save"> <input type="reset" value="Cancel" name="Cancel" onclick="cancel()"></td> </tr> </table> </div> <jsp:include page="footer.jsp" /> </s:form> </body> </html:html> Thanks in advance, Rajeev -- View this message in context: http://www.nabble.com/AJAX-issues-in-struts-2.1.6-tp23584424p23832201.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org