bugmldonkey, a multi-networks file-sharing client - Bugs: bug #21890, cannot list other options


You are not allowed to post comments on this tracker with your current authentication level.

bug #21890: cannot list other options

Submitted by:  test <test>
Submitted on:  Wed 26 Dec 2007 02:56:30 PM UTC  
Category: HTTP interfaceSeverity: 3 - Normal
Item Group: Program malfunctionStatus: Need Info
Assigned to: NoneOpen/Closed: Open
Release: Release: 2.9.2
Operating System: LinuxBinaries Origin: Gentoo ebuild
CPU type: x86_64

Sat 10 Apr 2010 06:45:01 PM UTC, comment #5:

So does anybody know why page switching is implemented via onclick (not simple href) and what setTimeout is for? I could not find any explanation or comment in old commits that introduced this behaviour..

ygrek <ygrek>
Project Member
Sun 13 Jan 2008 06:22:37 AM UTC, comment #4:

what's the point on using onclick? why not simply use href="..." instead of onclick?

test <test>
Thu 27 Dec 2007 01:35:35 AM UTC, comment #3:

sorry, i do not have any cvs version checked out. i just check the html code in my browser generated by mldonkey and find out (guess) that it's that script was wrong.

window.location.href = '..' is executed immediately when i click and the url is right. but after 500 ms, the setTimeout function is executed which load the wrong window.location.href, because window.location.href won't be updated until page is loaded. window.location.href is always the current document url even you set it to something else.

and i used firefox + firebug extension and IE + httpwatch, both show me that mldonkey web try to load the expected url at first (request 1), but is aborted later because the unexpected url is requested instead (request 2).

and btw, i do not know why the setTimeout is needed anyway. ff/ie/opera don't need it afaik, is it for other browsers?

test <test>
Thu 27 Dec 2007 12:17:29 AM UTC, comment #2:

So the problem is the timeout, which is longer than the time it
takes to display the MLDonkey webpage on a remote machine?

Could you provide a patch against MLDonkey CVS with your suggested fixes?

spiralvoice <spiralvoice>
Project Administrator
Wed 26 Dec 2007 02:57:47 PM UTC, comment #1:

oops, i forgot to mention. i'm accessing mldonkey via http to a remote server instead of a local one, and loading the web takes more than 500ms

test <test>
Wed 26 Dec 2007 02:56:30 PM UTC, original submission:

click: options (same as clicking options -> settings -> clients, as which is default)
and i can see
"Client Ports html Delays Files Mail Net Misc changed All"
there're only a few options which belongs to "Client" group

problem: when i click "Ports", "html" or whatever except "All", i see exact options that belongs to "Client" not "Ports" group. and the frame url is always http://host/submit?q=voo+1 (unexpected), while it should be http://host/submit?q=voo+2 or so (expected)

suggested fix:

find onclick="javascript:window.location.href='submit?q=voo+2';setTimeout('window.location.replace(window.location.href)',500)" and remove setTimeout('window.location.replace(window.location.href)',500), do it all for voo+1 voo+3 voo+4 etc

or replace it with
onclick="javascript:var href ='submit?q=voo+2';window.location.href=href;setTimeout(function(){window.location.replace(href)},500)"

test <test>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by ygrek (Posted a comment)
  • -unavailable- added by spiralvoice (Posted a comment)
  • -unavailable- added by test (Submitted the item)
  • -unavailable- added by test

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 27 Dec 2007 12:17:29 AM UTCspiralvoiceStatusNone=>Need Info
    Wed 26 Dec 2007 02:56:31 PM UTCtestCarbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1