wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes jQuery tabs UI issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery tabs UI issue" Watch "jQuery tabs UI issue" New topic
Author

jQuery tabs UI issue

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9344
    
    2

I have a jsp page which is built using the jQuery UI tabs. Each tabs contains one or more forms. Clicking any one of the forms will call another jsp page and somehow I'm able to load this new jsp page under the same tab. I also have the tab id in this new jsp page. Additionally I have a back button on this new jsp page which should take me back to the original tab from where this jsp came from. My idea is to call the main jsp page which contains all these tabs and on ready of that jsp page, execute some jQuery stuff to open and show the respective tab that I want. Did I think it right?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9344
    
    2

I'm almost in the last leg of getting this stuff work. I now have the tab id back in the original jsp from which I called another jsp. Need to figure out on how to get this shown.

I'm using the gerUrlParam plugin.

A snippet of what I'm actually doing:


But the tab is not shown once I get to this jsp.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60741
    
  65

And is param set to what you think it should be?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9344
    
    2

alert(param); for example gives me 1 when I clcik some links in the first tab (I assume that the tabs are numbered from 0). But how to I show the first tab when I land in this jsp page back again is what I need to solve now?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60741
    
  65

The indexes are zero-based. So a value of 1 will select the second tab.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9344
    
    2

But the problem is that the tab sees not to be selecetd. I'm using the mouseover effect for the tabs. ould this be the reason why the tab does not get selected on page load?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Make a running example of your problem with jsbin.

Eric
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9344
    
    2

Is there a way to get the href attribute of the currently selected tab?
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9344
    
    2

Joe Harry wrote:Is there a way to get the href attribute of the currently selected tab?


This is how var pageNum = $("#tabs a").attr("href");
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
tells you how to get the selected index in the docs: http://docs.jquery.com/UI/Tabs
 
wood burning stoves
 
subject: jQuery tabs UI issue
 
Similar Threads
pdf content is not showing in Firefox
jQuery tabs UI issue
How to make browser remember in-page navigation history?
jQuery UI tabs not loading in the same tab
jQuery loading image