The page is not disappearing after i click submit button. Actually my ajax call is made by onchange event of the text box named "totalDemand". Whenever the textbox value is changed, the ajax call is made. When my page loads for the first time the header and footer disappears. After doing a debug i found that when i put breakpoint at the start of the function that handles ajax request, The page seems to be ok( the header and footer provided by decorator page is appearing) but the the response is sent back to update the div, the header and footer disappears.
On 2/26/08, Richard Sayre <[EMAIL PROTECTED]> wrote: > > When is you page disappearing? After you click "Submit"? You submit > is not using Ajax. If you want to update your div when you submit the > form then you could write a function that notifies your listen topic > rather than submitting the form. > > Rich > > > > > On Tue, Feb 26, 2008 at 7:22 AM, Prashant Khanal > <[EMAIL PROTECTED]> wrote: > > Hello all, > > > > Somehow my header and footer provided by my decorator page disappears > after > > ajax call. My jsp page that makes ajax call is shown below: > > <%@ include file="/common/taglibs.jsp"%> > > <head> > > <s:head theme="ajax" debug="true" /> > > <title>Demand Plan</title> > > </head> > > <body> > > <s:form id="demandForm" name="demandForm" action="saveDemandPlan"> > > <li>Sequence: <s:property > > value="%{#session.planSequence.sequenceName}" /></li> > > <li><s:textfield key="demand.totalDemand" name="totalDemand" > > cssClass="text large" required="true" theme="css_xhtml" > > onchange="javascript:dojo.event.topic.publish > ('distributeDemandTopic');" > > /></li> > > > > <s:url id="distributedDemand" action="distributedDemand"/> > > <s:div theme="ajax" href="%{distributedDemand}" formId="demandForm" > > listenTopics="distributeDemandTopic"/> > > <li><s:submit cssClass="button" /></li> > > </s:form> > > </body> > > > > The page that is comes as an ajax response is: > > <%@ include file="/common/taglibs.jsp" %> > > <display:table name="selectedDemandPlans" id="selectedDemandPlan"> > > <display:column title="HierarchyLevelEntity" property=" > > hierarchyLevelEntity.entityName" /> > > <display:column title="Forecast Demand"><s:textfield > > > > > name="selectedDemandPlansMap[%{#attr.selectedDemandPlan.hierarchyLevelEntity.entityId}].forecastDemand" > > value="%{#attr.selectedDemandPlan.forecastDemand}" > > theme="simple"/></display:column> > > <display:column title="% Total"><s:textfield > > > > > name="selectedDemandPlansMap[%{#attr.selectedDemandPlan.hierarchyLevelEntity.entityId}].percentageTotal" > > value="%{#attr.selectedDemandPlan.percentageTotal}" > > theme="simple"/></display:column> > > </display:table> > > > > The snippet of struts.xml that configures the action is: > > <action name="planDemand" class="demandPlanAction"> > > <result > name="success">/WEB-INF/pages/demandPlan.jsp</result> > > </action> > > > > <action name="distributedDemand" class="demandPlanAction" > > method="distribute"> > > <result > > name="success">/WEB-INF/pages/distributedDemands.jsp</result> > > </action> > > > > After an ajax call my header and footer disappears. > > What can be the problem? :( > > > > -- > > Thanks, > > Prashant Khanal > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks, Prashant Khanal [EMAIL PROTECTED] Solutions for your information _________________ Yomari Pvt. Ltd. HB Complex, Ekantakuna, Lalitpur. G.P.O. Box: 21295 Kathmandu, Nepal Tel: 977 (1) 5000111, 2113000 Fax: 977 (1) 5000157 http://www.yomari.com ____________________ Your guide to Nepal on the Net. http://www.nepalhomepage.com