Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Browse - IE - Resetting to top of cat tree each time?

Quote Reply
Browse - IE - Resetting to top of cat tree each time?
Hi,

I recently upgraded IE from 5.5 to 6.0 and now when I use the category browser and 'add' a category, the left cat-tree panel resets to the top of the tree (used to remain at the cat I was editing). This means I have to scroll right down the cat-tree each time to get to the category I'm editing and its quite time consuming.

Is there something I need to set in IE's options to get the previous behavour back, or is this a problem with broswer.cgi - anyone know?

All the best
Shaun
Quote Reply
Re: [qango] Browse - IE - Resetting to top of cat tree each time? In reply to
This has been bugging me for months (got really tired of scrolling down huge lists of categories) so I set about trying to solve the problem this morning. Its taken me ages, and I finally found it - such a simple thing too Smile

If you're using IE 6.0 then you need to edit browser.html at:

Code:
if (document.all) {
var ver = navigator.appVersion;
var ie55 = (ver.indexOf("MSIE 5.5") > -1) ? 1 : 0;
if (ie55) {
frames[LEFT_FRAME_ID].location.hash = node_id;
}

Update it to:

Code:
if (document.all) {
var ver = navigator.appVersion;
var ie55 = (ver.indexOf("MSIE 5.5") > -1) ? 1 : 0;
var ie60 = (ver.indexOf("MSIE 6.0") > -1) ? 1 : 0;
if (ie55) {
frames[LEFT_FRAME_ID].location.hash = node_id;
}
if (ie60) {
frames[LEFT_FRAME_ID].location.hash = node_id;
}


That fixes it and returns the previous behavour of jumping to the 'active' category or the one you're expanding Smile

Hope someone else finds this useful!

All the best
Shaun
Quote Reply
Re: [qango] Browse - IE - Resetting to top of cat tree each time? In reply to
You should use the script below to detect the version of IE, so it well not break again for later version of IE:

function isIE() {
var ver = window.navigator.appVersion;

var pos = ver.search('MSIE ');
var ie = false;

if ( pos == -1 ) {
return ie;
}

if ( ver.substr(pos + 5, 1) > 5 ) {
ie = true;
}
else if ( ver.substr(pos + 5, 1) == 5 ) {
var v = ver.substr(pos + 7, 1);
if ( !isNaN(v) && v >= 5 ) {
ie = true;
}
}
return ie;
}

and change:
if (isIE()) {
frames[LEFT_FRAME_ID].location.hash = node_id;
}

TheStone.

B.
Quote Reply
Re: [TheStone] Browse - IE - Resetting to top of cat tree each time? In reply to
Hi,

Could you show what should be replaced in the browser code please?!?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Browse - IE - Resetting to top of cat tree each time? In reply to
Just add the isIE subroutine above into browers.html and replace the set_location function with:

function set_location (node_id) {
if (document.all) {
if ( isIE() ) {
frames[LEFT_FRAME_ID].location.hash = node_id;
}
}
}

TheStone.

B.
Quote Reply
Re: [klauslovgreen] Browse - IE - Resetting to top of cat tree each time? In reply to
TheStone,

Thanks for the update - that will help, especially since IE sometimes tends to update itself Smile

However, how would be code that into browser.html?

All the best
Shaun
Quote Reply
Re: [qango] Browse - IE - Resetting to top of cat tree each time? In reply to
Hi I have the same problem with IE6.0 Frown

Your code not work for me, only work with this code http://www.gossamer-threads.com/...i?post=118074#118074

Code:
if (document.all) {
var ver = navigator.appVersion;
var ie60 = (ver.indexOf("MSIE 6.0") > -1) ? 1 : 0;
if (ie60) {
alert ("Version: " + ver);
frames[LEFT_FRAME_ID].location.hash = node_id;
}
}


But if I delete the line:

Code:


alert ("Version: " + ver);


the code not works...

Anyone can help me?

-----------------------
Nomada
Quote Reply
Re: [Nomada] Browse - IE - Resetting to top of cat tree each time? In reply to
This is fixed in the latest version I believe...

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Browse - IE - Resetting to top of cat tree each time? In reply to
I works with LinkSQL 2.1.2 and IE 6.0... And not work for me Frown

Help please!

-----------------------
Nomada