ID:170035
 
could anyone suggest a way in which i could incorporate a button on a html popup that closes the window when clicked? This will be applied to pop up windows that come up when you tlak to an NPC...


Thanks in advance


- GunRunner
Add this to your HTML:
<input type=button value='Close' onClick='document.location.href="BYOND://?close=[window_name]";'>

where [window_name] is the name of the browser window.

Then catch it in client.Topic() like this:
client/Topic(href,hlist[])
if(hlist["close"])
src << browse(null, "window=[hlist["close"]]")
return ..()
In response to Shadowdarke
thanks bro, help muchly appreciated.