view source the related option for jquery(after sj_query convert into jquery), it shows following <script type='text/javascript'> jQuery(document).ready(function () { var options_partmoreinfo = {}; options_partmoreinfo.jqueryaction = "tabbedpanel"; options_partmoreinfo.id = "partmoreinfo"; options_partmoreinfo.oncom = "tabcomplete"; options_partmoreinfo.oncha = "tabchange"; jQuery.struts2_jquery_ui.bind(jQuery('#partmoreinfo'),options_partmoreinfo); }); <script type='text/javascript'>jQuery(document).ready(function () { var options_partmoreinfo = {}; options_partmoreinfo.jqueryaction = "tabbedpanel"; options_partmoreinfo.id = "partmoreinfo"; options_partmoreinfo.oncom = "tabcomplete"; options_partmoreinfo.oncha = "tabchange"; jQuery.struts2_jquery_ui.bind(jQuery('#partmoreinfo'),options_partmoreinfo); }); </script> that is why i use the following $('#partmoreinfo').tabs("selectedTab", "partmoreinfo_id", 3); or $("#partmoreinfo").tabs( "taboptions", "partmoreinfo_id", 3); to access the attribute selectedTab of sj:tabbedpanel's attrubte "selectedTab", but not working. <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> Please advise thanks again john
________________________________ From: Chris Pratt <thechrispr...@gmail.com> To: john lee <sh_thorn_b...@yahoo.com> Cc: Struts Users Mailing List <user@struts.apache.org> Sent: Friday, August 9, 2013 1:27 PM Subject: Re: sj:tabbedpanel javascript I have no idea what you mean. The sj:tabbedpanel generates HTML Elements and some jQuery based JavaScript. It'll all be there in the source. What's not "match"ing? (*Chris*) On Fri, Aug 9, 2013 at 11:00 AM, john lee <sh_thorn_b...@yahoo.com> wrote: > 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 <thechrispr...@gmail.com> > *To:* Struts Users Mailing List <user@struts.apache.org>; john lee < > sh_thorn_b...@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_b...@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> > > > > >