Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 04:30 am EST

Geeklog Forums

Navbar scroll issue


Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
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
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
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.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
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
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
I don't find the solution for this scrolling issue. I will try to build my tabs another way.

Thanks.

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
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?
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
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 Smile
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
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) ?


Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
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 Smile

You can see the result here.

::Ben


I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

All times are EST. The time is now 04:30 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content