• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to keep the container updated with AjaxUpdateLink?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to keep the container updated with AjaxUpdateLink?


  • Subject: How to keep the container updated with AjaxUpdateLink?
  • From: Mai Nguyen <email@hidden>
  • Date: Mon, 09 May 2011 13:59:36 -0700

Hello Ajax gurus,

I am using the AjaxUpdateLink to update a table inside a page instead of refreshing the whole page.
However, the link only refreshes the Ajax Update Container (which wraps the table) briefly while the user clicks on the link. 
Can someone point to me how to make sure the container remains updated until the user clicks on the link again to hide the contents?
 I wish to allow the user to explicitly click on "Hide Explanation" to hide the explanation.

Currently with the following wod description, an onClick causes the link to update the container correctly, but it only lasts a few seconds, then the update container returns to its previous state.

Here is the description of the link:
 
ExplanationLink: AjaxUpdateLink {
  updateContainerID = "SearchResultsUpdateContainer1";
  action = showStatusExplanation;
onClick = "show_explanation(this)";
evalScripts = true;
onComplete = "SearchResultsUpdateContainer1Update()";
 }

function show_explanation(element) {
case_number = element.parentNode.parentNode.id;
explanation_row = document.getElementById(case_number + "_status");


if (element.innerHTML == "What does this mean?") {
element.innerHTML = "Hide Explanation";
explanation_row.style.display = '';
} else {
element.innerHTML = "What does this mean?";
explanation_row.style.display = 'none';
}
};

public WOActionResults showStatusExplanation() {
return null;
}

Is an action binding required here? If yes, since the onClick JS Script already takes care of the display, can the action just return null?

Thanks for any hints,

-mai
        
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to keep the container updated with AjaxUpdateLink?
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: eogenerator options
  • Next by Date: Re: eogenerator options
  • Previous by thread: Re: eogenerator options
  • Next by thread: Re: How to keep the container updated with AjaxUpdateLink?
  • Index(es):
    • Date
    • Thread