struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john lee <sh_thorn_b...@yahoo.com>
Subject Re: sj:tabbedpanel javascript
Date Fri, 09 Aug 2013 18:00:55 GMT
thanks for reply,
 
i did view source before ask question here, but sj:tabbedpanel convert into jquery, even view
source, still not match.
 
john
 

________________________________
 From: Chris Pratt <thechrispratt@gmail.com>
To: Struts Users Mailing List <user@struts.apache.org>; john lee <sh_thorn_bird@yahoo.com>

Sent: Friday, August 9, 2013 12:43 PM
Subject: Re: sj:tabbedpanel javascript
  


Use the "View Source" feature in your browser to see what's being generated, then you should
be able to see for yourself how to use JavaScript to interact with the on-screen components.
  (*Chris*) 



On Fri, Aug 9, 2013 at 10:25 AM, john lee <sh_thorn_bird@yahoo.com> wrote:

 
>try to using javascript to set sj:tabbedpanel's attribute, but not working
> 
>what is the correct format for access attribute sj:tabbedpanel's atrtribute in javascript?
> 
>thanks in advance
> 
>John
> 
> 
> 
><script language="javascript">
> 
>function setpartmoreinfo(id) {
>        $("#Cross").tabs( "option", "partmoreinfo_id", id);     
>      }
></script>
> 
><a href="#" onclick="javascript:setpartmoreinfo(2)">change display<a>
> 
> <sj:tabbedpanel id="partmoreinfo" selectedTab="%{partmoreinfo_id}">
>       <sj:tab id="tab1" target="Accessories" label="Accessories"/>
>       <sj:tab id="tab2" target="Replacement" label="Replacement Parts"/>
>       <sj:tab id="tab3" target="Cross" label="Cross Reference"/>
>       <div id="Accessories"> Accessories here </div>
>       <div id="Replacement"> Replacement Parts here </div>
>       <div id="Cross"> Cross Reference here </div>
>  </sj:tabbedpanel>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message