there is multithreaded web programming but there is no multithreaded javascript.
when javascript executes in a browser on the client it is interpreted line by line and won't render anything while it is executing.
you can tap into open source libraries to "imitate" multithreading but basically each javascript needs a page to live and run on.
some tricks are to pass long running functions to run inside of an iframe or to use a setTimeout function to do some work for 50 milliseconds at a time until some flag you use to keep track of the job says the work is done like isFinished == true
the latest versions of flash player allows multithreading in it but it is limited to very basic usage across a single domain.
html 5 web workers are another option but won't work in all browsers