ID:157426
 
src<<browse(D,"window=who,size=500x300,can_resize=0,can_minimize=0")

while(D)
sleep(5)
src<<browse(D,"window=who,size=500x300,can_resize=0,can_minimize=0")


im trying to make the browser update everytime something is clicked so it shows the most recent values. The method above is drasticaly flawed but it is there to help show what im aiming for.
When the values change, use browse() again.
Additionally to an event-driven design, as Garthor suggested, you might want to use a more visual appealing (and actually far less resource intense) version.
Since BYOND 441, the browser control can be used to execute JavaScript via the output() command. This allows for the creation of more dynamic interfaces, since JavaScript provides access to many client-side operations and flicker-free updates.
In response to Schnitzelnagler
Schnitzel, I was wondering whether you could give an example of a JavaScript output, replacing blocks of text instead of outputting the whole text again? I've looked through the Javascript resources, but didn't really help me along.
In response to Emasym
A little example[link] (similar to the one mentioned in the release note I linked to):
#define LP(str) list2params(list(str))

mob
Login()
. = ..()
usr << browse(\
{"
<script type="text/javascript">
function replace(v) {
document.getElementById('foo').innerHTML = v;
}
</script>
<div id="foo">This text can change.</div>
<p>And this can't.</p>
"}
);

verb
newtext(T as text)
usr << output(LP(T),"browser:replace")