Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

change <s:div with clic action in <sa

Manuel Correa

2007-08-06

Replies:

Hi, I want to switch the div when the users click in one of the links
built for Struts 2. I have a function that receive the new url to invoke
and get the widget but when arrive to the method refresh(, the system
said that method is not defined.



Somebody knows a better way to do this.



Code :



function updateDiv( url ) {

    var reportDiv= window['info'];

    reportDiv.href = url;

    reportDiv.refresh();

  }

 dojo.event.topic.getTopic("updateDivListTopic").subscribe(null,
"updateDiv");







<s:a id="link1"

   theme="ajax"

   href="#"

   notifyTopics="link1_topic"

   errorText="An Error ocurred" onclick="javascript:
dojo.event.topic.publish('updateDivListTopic', 'anotherpage.jsp');">Link
1</s:a>

 





<s:div theme="ajax" id="info" name="info" href="page.jsp"

    loadingText="Loading information..."

    errorText="Unable to contact server"

    listenTopics="link1_topic"

    >

  Placeholder...

</s:div>





Manuel Correa.

Application Analyst Specialist.

ITOS, Carl Vinson Institute of Government.

The University of Georgia.

Tel. (706) - 542-2164



©2008 junlu.com - Jax Systems, LLC, U.S.A.