Jack (TCC)

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromJack (TCC)
ToMe
Subjectdrop down menu navigation on Konqueror
Date4 May 2004 05:09
asttachmentfile demonstrating the search function
Hi Mark,

I've been referencing your site howcreate.co.uk a lot and it really
gave me a jump start on JavaScript. Thx for all your efforts to create
this useful site. 

Currently I am having trouble with the dropdown menu navigation using
input text box on Konqueror which is my target browser. The attached
script is very slick based on the binary search, it searches the item
while you type. I use this to deal with more than 10000+ items in the
option list and it runs well on all the browsers except Konq. It does
select the item, but doesn't scroll the list to make that item visible.
I have tried many things but still can't get it to work properly(I
wonder if it's KDE bug). The interesting thing is that, if I minimize
then maxmize the browser window, the list scrolls to where it should
be. There must be something triggers the Konqueror to redraw the list. 

It'd be appreciated if you can take a look at this issue.   

Thanks in Advance,

Best Regard,

Jack

P.S. I am using KDE 3.1.4, and I also tried newest 3.2.2 and still acts
the same way.
FromMe
ToJack (TCC)
SubjectRe: drop down menu navigation on Konqueror
Date4 May 2004 08:42
Jack,

Indeed this does sound like a Konqueror bug, albeit a minor one. Rendering
bugs can be a real pain to solve, as different pages may need different
fixes for the same bug, but I have found a number of tricks that may help
you here, most of which may produce a slight flicker as they force the
screen to redraw.

1. Try scrolling the window 1 px down, then 1px back up:
if( navigator.vendor == 'KDE' ) {
    window.scrollBy(0,1);
    window.scrollBy(0,-1);
}

2. Try setting the display style of the select box to 'none' then back to ''
if( navigator.vendor == 'KDE' ) {
    selectbox.style.display = 'none';
    selectbox.style.display = '';
}

3. Try resizing the window (urgh!)
if( navigator.vendor == 'KDE' ) {
    window.resizeBy(0,-1);
    window.resizeBy(0,1);
}

4. Try setting a timeout to set the selectedIndex of the select box to the
same thing again
if( navigator.vendor == 'KDE' ) {
    setTimeout('selectBox.selectedIndex=selectBox.selectedIndex;',1);
}

5. Try combining any of the above

hope you manage to extract something useful out of all that that can solve
your problem.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromJack (TCC)
ToMe
SubjectRe: drop down menu navigation on Konqueror
Date4 May 2004 14:07
Hi Mark,

I just tried this combination and works (with a little flicker).
Without "setTimeout", switching display properties doesn't work, so
here you go:
selectbox.style.display = 'none';
setTimeout("selectbox.style.display = ''",1);

Thanks again,
Jack
FromMe
ToJack (TCC)
SubjectRe: drop down menu navigation on Konqueror
Date4 May 2004 14:29
I had a feeling that sort of thing would do it. I've had to do something
similar myself with IE mac and iframes ...

messy business.

anyway, glad you got it working.
FromJack (TCC)
ToMe
SubjectRe: drop down menu navigation on Konqueror
Date4 May 2004 15:34
Yes, it's a messy business. It took me a while to figure out how to
reference iFrame in Konqueror also.
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.