File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery tabs UI issue

 
Joe Harry
Ranch Hand
Posts: 10047
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Joe Harry
Ranch Hand
Posts: 10047
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And is param set to what you think it should be?
 
Joe Harry
Ranch Hand
Posts: 10047
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The indexes are zero-based. So a value of 1 will select the second tab.
 
Joe Harry
Ranch Hand
Posts: 10047
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make a running example of your problem with jsbin.

Eric
 
Joe Harry
Ranch Hand
Posts: 10047
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to get the href attribute of the currently selected tab?
 
Joe Harry
Ranch Hand
Posts: 10047
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tells you how to get the selected index in the docs: http://docs.jquery.com/UI/Tabs
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic