ID:269649
 
I'm trying to make a popup including information, but I can't make a decent "Close" Hyperlink, whenever i click it, an IE question pops up asking If I want to close it, how do i get rid of this?
Bring
Up
My
Post
In response to SSJ4 Compufreak
You may not know this, but you have to wait 24 hours to bump. The post also has to be off the front page.
In response to Ol' Yeller
Oh Sorry >_>
Make a BYOND hyperlink, and catch it with Topic().

/*Place this somewhere in your html, 
it's your hyperlink.
By the way, 'src' is placed for the
atom that you're trying to access.
If 'src' is a mob, catch it with mob/Topic()
if 'src' is an obj, catch it with obj/Topic()
In this case, you'll want to access the mob,
because you want to close a mob's window.*/


<a href=?src=\ref[src];action=close>

/*If this is a mob/verb or mob/proc, src is
finebetween the brackets. However, if this
is a different atom's verb, use 'usr' between
the brackets, since youstill want to access
the mob.*/


mob/Topic(href,href_list[])
switch(href_list["action"])
if("close") src<<browse(null,"window="window's name you want to close here. This should be defined in your pop-up.")
else ..()


You just have to configure that a little.
In response to CaptFalcon33035
I don't really understand, so here's my code
var/infopopup1={"
<STYLE>BODY {background: black; color: white}</STYLE>
<body scroll=no>
<head><title>Welcome to the Magical Destiny Open Alpha</title></head>
<body>Welcome to the Magical Destiny Open Alpha<P></P>To talk with NPCs say 'Hi' or 'Hello' to them
<p></p>Report any bugs to Xeronage
<p></p> - Xeronage</body>
"}

var/const/windowsettings="window=Login;file=name;display=1;clear=1;size=350x200;border=1;can_close=0;can_resize=0;can_minimize=0;titlebar=0;"
//And its called with
usr<<browse(infopopup1,windowsettings)


In response to SSJ4 Compufreak
0.o

Anyway, I fixed a bit of your HTML. I don't know what the P tags opening and closing does, so, I left them in there. Anyway, I assumed you're trying to do something like this:
mob/Login()
..()
var/infopopup1={"<html><head><STYLE>BODY{background:black;color:white}
</STYLE><title>Welcome to the Magical Destiny Open Alpha</title></head>
<body scroll=no>Welcome to the Magical Destiny Open Alpha
<P></P>To talk with NPCs say 'Hi' or 'Hello' to them
<p></p>Report any bugs to Xeronage<p></p> - Xeronage
<p></p><a href=?src=\ref
[src];action=closelogin>
</body></html>"}

src<<browse(infopopup1,windowsettings)
mob/Topic(href,href_list[])
switch(href_list["action"])
if("closelogin") src<<browse(null,"window=Login")
var/const/windowsettings="window=Login;display=1;clear=1;size=350x200;border=1;can_close=0;can_resize=0;can_minimize=0;titlebar=0;"


It's not exactly going to work if you just have a variable that displays the HTML, because you will not be able to place a close link in it that says 'Are you sure you wish to close this window?' or whatever it asks.
In response to CaptFalcon33035
I edited it a bit and now it works! thanks man