Posted on: 10/29/08 10:54am
By: ::Ben
Hello,
Maybe this is a question for Blaine, the author of the navbar.class.
navbar is use on usersettings, it's a core component. With navbar you can click on tabs and show or hide different divs.
If the navbar is on top of the page eveything is ok when you click on a tab. But if you scroll down a little bit your page or if the navbar is in a centerblock at the bottom of the page, when you hit a tab the page scroll up and you need to scroll down to see the block.
The question is how to change this?
::Ben
Re: Navbar scroll issue
Posted on: 10/29/08 11:00am
By: Blaine
You can try adding a return false; to the navbar tab link. If you look a the HTML that is rendered on the Member Account page, where the navbar class is used for the menu, you will see the return false; in each of the tab links. This effectively cancels the link and the browser page position should not change.
Re: Navbar scroll issue
Posted on: 10/29/08 04:25pm
By: ::Ben
Hello Blaine,
Yes return false are on for each tab but the scroll up is there too. I can confirm the same effect on the user settings page or the forum config with IE, FF or Safari on a windows XP machine.
::Ben
Re: Navbar scroll issue
Posted on: 11/03/08 06:37pm
By: ::Ben
I don't find the solution for this scrolling issue. I will try to build my tabs another way.
Thanks.
::Ben
Re: Navbar scroll issue
Posted on: 11/04/08 12:42am
By: Blaine
I don't experience the issue FF3 and IE7 on vista - and don't recall seeing this on XP when I developed the navbar but don't have XP around presently to test.
Anyone else seeing this?
Re: Navbar scroll issue
Posted on: 11/04/08 04:19pm
By: ::Ben
Hi Blaine,
Can the solution be in the double quote instead of simple quote?
In my code my add_menuitem is
Text Formatted Code
$navbar->add_menuitem($label,'showhideProfileEditorDiv("'.$id.'",'.$cnt.');return false;',true);
And the navbar class apply to my label
Text Formatted Code
$onclick = " onclick='{$this->_onclick[$label]}'";
so simple quote are use. When I rewrite the navbar class to get double quote,
Text Formatted Code
$onclick = ' onclick="' . "{$this->_onclick[$label]}" . '"';
it's like the template engine break my solution and I get
Text Formatted Code
<a href="#" onclick="showhideProfileEditorDiv(" ga_myalbum="" ,1);return="" false;=""><span style="padding-top: 5px;">
Maybe I'm to "young" to understand where the matter is...
::Ben is learning
Re: Navbar scroll issue
Posted on: 11/04/08 04:46pm
By: Blaine
Hi Ben,
The line of PHP code you quoted
Text Formatted Code
$navbar->add_menuitem($label,'showhideProfileEditorDiv("'.$id.'",'.$cnt.');return false;',true);
is the exact line of code from usersettings.php and from what I see when I test in the browser, does not cause the browser to jump. Just to confirm, are you seeing the browser jump on the member account edit page (with no code changes) ?
Re: Navbar scroll issue
Posted on: 11/17/08 04:02pm
By: ::Ben
Hello Blaine,
Sorry for my late reply.
Yes I used the same code from usersettings to build the tabbed box and yes the browser
do not jump on the member account edit page. :banghead: Same code but not same effect. Maybe I will try once more...
Two days ago I switch to a new tabbed box (tabber.js by Patrick Fitzgerald barelyfitz.com) easy to set up and working good
You can see the result
here[*1] .
::Ben