Never mind, I realized my mistake that I was using anchors in my li's. Narinder.
On Oct 26, 11:18 am, Narinder <[EMAIL PROTECTED]> wrote: > Hi, > > I tried using this example to open a link via tab click, > as a new page. But $.data(ui.tab, 'load.tabs'); returns 'undefined' > for me and > the URL that gets opened in the browser is like : > -http://localhost:8080/TrueLister/undefined. My tabs set up is pasted > below > > $('#example').tabs({ > select: function(e, ui) { > location.href = $.data(ui.tab, 'load.tabs'); > return false; > } > > }); > > <script type="text/javascript"> > $(document).ready(function() { > $('#container-1 ul').tabs({ > select: function(e, ui) { > if(ui.tab.hash.indexOf('fragment') < 0){ > var url = ui.tab.hash.substring(1); > //document.location = url; > location.href = $.data(ui.tab, 'load.tabs'); > return false; > }else{ > return true; > } > } > }).show(); > $('#container-1 > ul').tabs('select',currMainTab); > }); > > </script> > <div id="container-1"> > <ul> > <li><a href="#fragment-1"><span>Listings</span></a></li> > <li><a href="#fragment-2"><span>Images</span></a></li> > <li><a href="#fragment-3"><span>Feedbacks</span></a></li> > <li><a href="#fragment-4"><span>Messages</span></a></li> > <li><a href="#fragment-5"><span>Reports</span></a></li> > <li><a href="#fragment-6"><span>Shipments</span></a></li> > <li><a href="#fragment-7"><span>My Account</span></a></li> > </ul> > <div id="fragment-1"> > <ul> > <li><a href="#fragment-1c"><span></span></a></li> > <li><a href="#ListingEditAction.do? > action=new"><span>Create Listing</span></a></li> > <li><a href="#ListingEditAction.do? > action=new"><span>Create Template</span></a></li> > <li><a href="#ViewListingAction.do? > action=pending"><span>Pending Listings</span></a></li> > <li><a href="#ViewListingAction.do? > action=listed"><span>Active Listings</span></a></li> > <li><a href="#ViewListingAction.do? > action=sold"><span>Sold Listings</span></a></li> > <li><a href="#ViewListingAction.do? > action=unsold"><span>Unsold Listings</span></a></li> > <li><a href="#ViewListingAction.do? > action=archived"><span>Archived Listings</span></a></li> > </ul> > </div> > <div id="fragment-2"> > <ul> > <li><a href="#fragment-2a"><span></span></a></li> > <li><a href="#imageLoader.jsp"><span>Upload</span></ > a></li> > <li><a href="#ViewImagesAction.do? > action=viewListingImage&menu=show"><span>Browse</span></a></li> > <li><a href="#fragment-2d"><span>Settings</span></a></ > li> > </ul> > </div> > <div id="fragment-3"> > <ul> > <li><a href="#fragment-3hidden"><span></span></a></li> > <li><a href="#fragment-3a"><span>New Template</span></ > a></li> > <li><a href="#SettingsEditAction.do"><span>Templates</ > span></a></li> > <li><a href="#fragment-3b"><span>Received</span></a></ > li> > <li><a href="#fragment-3c"><span>Posted</span></a></ > li> > <li><a href="#fragment-3d"><span>Settings</span></a></ > li> > </ul> > </div> > <div id="fragment-4"> > <ul> > <li><a href="#fragment-4hidden"><span></span></a></li> > <li><a href="#fragment-4a"><span>System</span></a></ > li> > <li><a href="#fragment-4b"><span>Buyer</span></a></ > li> > <li><a href="#fragment-4c"><span>Archived</span></a></ > li> > <li><a href="#fragment-4d"><span>Settings</span></a></ > li> > </ul> > </div> > <div id="fragment-5"> > <ul> > <li><a href="#fragment-5hidden"><span></span></a></li> > <li><a href="#fragment-5a"><span>Monthly Sales</span></ > a></li> > <li><a href="#fragment-5b"><span>Daily Sales</span></ > a></li> > <li><a href="#fragment-5c"><span>Ebay Fees Report</ > span></a></li> > </ul> > </div> > <div id="fragment-6"> > <ul> > <li><a href="#fragment-6hidden"><span></span></a></li> > <li><a href="#fragment-6a"><span>Create New</span></ > a></li> > <li><a href="#fragment-6b"><span>Shipments</span></a></ > li> > <li><a href="#imageLoader"><span>Settings</span></a></ > li> > </ul> > </div> > <div id="fragment-7"> > <ul> > <li><a href="#fragment-7hidden"><span></span></a></li> > <li><a href="#fragment-7a"><span>eBay Token</span></ > a></li> > <li><a href="#changepassword.jsp"><span>Change > Password</span></a></li> > <li><a href="#SettingsEditAction.do? > action=editUser"><span>Settings</span></a></li> > </ul> > </div> > </div> > > On Oct 23, 3:15 am, Klaus Hartl <[EMAIL PROTECTED]> wrote: > > > Did you have a chance to read the FAQ? > > >http://docs.jquery.com/UI/Tabs#...open_a_tab_in_a_new_window_instead.3F > > > --Klaus > > > On 23 Okt., 08:55, Narinder <[EMAIL PROTECTED]> wrote: > > > > I am using jquery tabs UI as the navigation menu for my application. > > > The default behavior of jquery tabs is to open the target "href" of > > > the tab in a panel. I need a way to teach it to open the tab href in > > > the browser as a new page instead of inline ajax content. > > > > Is that doable at all? I hooked into select function of the tabs but > > > when i look at ui.tab.href in debugger, it is the id of the tab i.e. > > > some value like "ui-tabs-15" > > > > <script type="text/javascript"> > > > $(function() { > > > $('#container-1 ul').tabs( { > > > select: function(e, ui) { > > > // ui.tab is an 'a' object - href can be taken > > > directly as > > > var url = ui.tab.url; > > > document.location = url; > > > return false; > > > } > > > }).show(); > > > }); > > > > </script> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
