Can anyone help? :-(
when select call back returns false, I don't want the tab to be
refreshed. What are the options I have? :-(
:-(
On Sep 12, 11:35 am, simpi <[EMAIL PROTECTED]> wrote:
> I have 6 tabs on my screen. I'm using Struts framework and each Tab
> has a separate Controller and Save button. Requirement is when user
> tabs away without saving, I need to show a confirmation message to
> make sure that what they want to do. If they click Yes, they go to the
> new tab and if they click No they stay on the same tab.
> ***Everything works except that on Clicking No, the tab contents are
> refreshed so all their changes are lost even if they stay on the same
> tab :-(***
>
> Is there a away I can stop tab refresh? THANKS A LOT FOR THE HELP &
> FOR CREATING JQUERY !!!
> ----------------------------------------------
> function checkChangeFlag()
> {
> if(document.forms[0].changeFlag.value =="Y")
> {
> var agree = confirm("Are you sure you want to tab away without
> saving?");
> if (agree)
> {
> document.forms[0].changeFlag.value ="N";
> return true ;
> }
> else
> {
> document.forms[0].changeFlag.value ="Y";
> //stay on the same tab
> $('#ap > ul').tabs({
> select: function(e, ui) {
> return false ;
> }
> });
> return false ;
> }}
>
> else
> {
> return true ;}
> }
>
> ------
> <div id="ap">
> <ul>
> <c:url value="/FormsAvailability.do" var="FAURL" >
> <c:param name="action" value="doSearch"/>
> <c:param name="id" value="${apFormBean.id}"/>
> </c:url>
> <li><a href="<c:out value="${FAURL}"/>" onclick="return
> checkChangeFlag()"><span>Forms Availability</span></a></li>
>
> .......etc..... other 5 <li>...and then:
>
> </ul>
> </div>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---