Тhank you bazzapr!
I am the author of the JavaScript so I can change it.
Your method can be used but I need the function itself to return the result since the execution takes some time.
I found this solution : http://www.vbforums.com/showthread.p...-work-in-vb6.0.
But this is a partial solution because I need to use WebBrowser Control.
So my next question is:

Can I call a function in a Visual Basic from WebBrowser Control?