user << browse(file,"window=[id]")
user << output(url_encode("hi"), "[id]:initialize")
Problem description:
Basically I want to call initialize("hi") in javascript but I can't seem to get it to work. I've tried params2list and it didn't work either unfortunately.
I've googled this several times and found results for it, but everything I tried does not work or does not apply to what I am doing. The documentation very lightly covers this but not with javascript commands. I'm at my wits end right now.
Unfortunately, this leads to incompatibility with the "id:script" form of output(). The output() proc expects only the id of the browser control, without including the window. This means it will accept "unique_browser_id:scriptname", but not "window_id.browser_id:scriptname". I'm not sure if this is a limitation or a bug.
In any case, what this means is you will have to avoid using browse(), create your browser popup manually, and ensure that the browser control's id is unique.
Here is an example using your vars:
Without those sleep() calls, you can get the occasional failure. This is because Dream Seeker's interface is not synchronized with the server, so race conditions can occur. For large files, you may need to sleep for longer.
It would be nice if you could specify an existing browser with browse(), other than the default, or use a browser's full id in output() when calling JavaScript, but these procs are just not compatible, so this is the best we can do for now.