ID:173079
 
how do i close titlebar-less browser windows? as in like
src << browse("boring html here","window=[src.name],display=1,border=0,size=500x300,tit lebar=0,can_close=0,can_minimize=0,can_resize=0")
how do i get it so when they click a link (or button) it will close the window? i've sat here for about 30 mins trying to figure it out and i can't to it. the javascript:self.close() only closes the browser control byond uses, and not the actual window. any input would be very cool.

Thanks
Daniel
InsayneWrapper wrote:
how do i close titlebar-less browser windows?

You need to browse null with the same window name, like this:

<code>player << browse(null, "window=windowname")</code>
In response to Foomer
Foomer wrote:
InsayneWrapper wrote:
how do i close titlebar-less browser windows?

You need to browse null with the same window name, like this:

<code>player << browse(null, "window=windowname")</code>

tried that earlier, didnt work. just gave me blank white window. and even then, how do i make it browse that after i click something? i tried doing like defining player << browse(null, "window=windowname") as a var, and setting the var inside the url but i dont think thats the right way...
In response to InsayneWrapper
mob/verb/breep()
usr << browse({"This is a very boring window. It sucks. Therefor...<br><br><center>Click <a href=?close>here</a> to close me, quick (or press ALT+F4 while having this window selected)!"},"window=MyBrowser;titlebar=0")

client/Topic(href)
if(href == "close")
src << browse(null,"window=MyBrowser")
else ..()

The working code.

Oh, and please note you can't use it on everything.

usr << browse({"Thi ....."},">>>window=MyBrowser<<<;titlebar=0")

window=MyBrowser

src << browse(null,"window=MyBrowser")

Whatever is behind "window=" will be used to "overwrite" a window.
So if you'd do this:
mob/verb/hi()
usr << browse("Hi!","window=window")
mob/verb/bye()
usr << browse("Bye!","window=window")


...then whenever you click "hi" or "bye", the previous "hi" or "bye" window will be closed.

In response to PBYOND
haha! rock on thanks alot!