ID:141622
 
Code:
client/Topic(T)
if(T=="Welcome")
usr<<{"
<html>
<body>
<STYLE>BODY{background-color: red; color:black}</STYLE><font size="+1">
Welcome To Sins of the City. This is a matrix/rpg game<br><A HREF=#Cancel>Return</A>.
</body>
</html>
"}

if(T=="Cancel")
usr<<{"
<html>
<body>
<STYLE>BODY{background-color: black; color:blue}</STYLE><font size="+1">
Welcome to the Sins of the City Datebase<br>
<A HREF=#Help>Help</A><br>
<A HREF=#Welcome>Welcome</A><br>
<a href=#Return>Return</A><br>
</body>
</html>
"}

if(T=="Return")..()
else ..()
mob/Login()
..()
usr << "When in doubt, click <A HREF=#Cancel>here</A>."


Problem description:

just try it out and youl find the problem... lol

instead of it taing over the chat window i simply want it to popup ina new window, and when you press the Return button, on the Cancel Topic, is closes. simple as that. about 3 weeks ago i could of done that eyes shut, thats what 3 weeks of non stop 46inch hdtv + Ps3 with guitar hero world tour+mic+drums+2 guitars does to ya lol
You would use the browse() proc.
In response to Jeff8500
oh yea! thanks...
In response to Rushnut
right, so i have got that sorted, but now i have another problem *oh joy*
var
Welcome={"
<html>
<body>
<STYLE>BODY{background-color: red; color:black}</STYLE><font size="+1">
welcome<br>
<a href=#Return>Return</A>
</body>
</html>
"}

sotcdb={"
<html>
<body>
<STYLE>BODY{background-color: black; color:blue}</STYLE><font size="+1">
sotcdb<br>

<A HREF=#Help>Help</A><br>

<A HREF=#Welcome>Welcome</A><br>

<a href=#Return>Close</A><br>
</body>
</html>
"}

Help={"
<html>
<body>
<STYLE>BODY{background-color: red, color:black}</STYLE><font size="+1">
help me<br>
<a href=#Return>Return</A>
</body>
</html>
"}

client/Topic(T)
if(T=="Welcome")
usr << browse(Welcome,"window=Welcome;can_close=0")
usr.sotcdbn=2
if(T=="sotcdb")
usr << browse(sotcdb,"window=sotcdb;can_close=0")
usr.sotcdbn=1
if(T=="Help")
usr << browse(Help,"window=Help;can_close=0")
usr.sotcdbn=3
if(T=="Return")
if(usr.sotcdbn==2)
usr << browse(sotcdb,"window=sotcdb;can_close=0")
else if(usr.sotcdbn==3)
usr << browse(sotcdb,"window=sotcdb;can_close=0")
else
usr << browse(sotcdb,"window=sotcdb;can_close=1")
mob/var/sotcdbn=0
mob/Login()
usr<<"<a href=#sotcdb>sdfasfds</a>"


When you first click the link when you log in, it works fine, but none of the other links work. People always want a good helpfile. why is it so hard?? lol... still... it isnt hard i suppose, im just not thinking like i used to :(
In response to Rushnut
As far as I know, in order for Topic() to be called, the link URL must begin with "byond://?" or "?". Using "#" may not be reliable.
In response to Kaioken
is lost... =S
In response to Rushnut
Rushnut wrote:
is lost... =S

You have to use "?" instead of "#". Just use the Replace-All feature to replace ? with #...
Kaioken's post seemed pretty straight forward to me, I guess you were too busy bragging about your TV & video games...
In response to Ephemerality
long live my tv and videogames.

anyways

ALMOST got it working like i want, almost.

This works, but when you click a link, it simply pops up again, is there a way of making the old window going away when i open the new one? btw, if so, then it means i can get rid of my old close window, because it sucks

anyways,

ive tryed browse<<"null" and it doesnt seem to close, you see and try if you can do it! :p

var
Welcome={"
<html>
<body>
<STYLE>BODY{background-color: red; color:black}</STYLE><font size="+1">
welcome<br>
<a href=?Cancel>Return</A>
</body>
</html>
"}

sotcdb={"
<html>
<body>
<STYLE>BODY{background-color: black; color:blue}</STYLE><font size="+1">
sotcdb<br>

<A HREF=?Help>Help</A><br>

<A HREF=?Welcome>Welcome</A><br>

<a href=?Cancel>Close</A><br>
</body>
</html>
"}

Help={"
<html>
<body>
<STYLE>BODY{background-color: red, color:black}</STYLE><font size="+1">
help me<br>
<a href=?Cancel>Return</A>
</body>
</html>
"}

Return={"
<html>
<body>
<STYLE>BODY{background-color: black; color:blue}</STYLE><font size="+1">
Goodbye!<br>
</body>
</html>
"}

client/Topic(href)
if(href=="Welcome")
usr<<browse(null)
usr << browse(Welcome,"window=Welcome;can_close=0")
usr.sotcdbn=2
if(href=="sotcdb")
usr<<browse(null)
usr << browse(sotcdb,"window=sotcdb;can_close=0")
usr.sotcdbn=1
if(href=="Help")
usr<<browse(null)
usr << browse(Help,"window=Help;can_close=0")
usr.sotcdbn=3
if(href=="Cancel")
if(usr.sotcdbn==2)
usr<<browse(null)
usr << browse(sotcdb,"window=sotcdb;can_close=0")
else if(usr.sotcdbn==3)
usr<<browse(null)
usr << browse(sotcdb,"window=sotcdb;can_close=0")
else
usr<<browse(null)
usr << browse(Return,"window=Return;can_close=1")
mob/var/sotcdbn=0
mob/Login()
usr<<"<a href=?sotcdb>sdfasfds</a>"


btw ignore my horrible coding, i know i have alot of randomly placed usr<<browse(null)'s, i was testing a theory out and forgot to clean my code lol
In response to Rushnut
Outputting null with browse() is indeed the method to clear the browser, however if you want it to close a specific window popup <small>(or to work on a specific browser control)</small>, then you need to actually specify the window so the function knows which window is involved. Kind of a common sense thing, but that's why it doesn't work.
In response to Kaioken
I think you can specify windows with the second argument in the browse() proc

window
This is the name used to identify the popup window. It is not visible to the user. Multiple calls to browse() with the same window name overwrite previous contents of the same popup window. If window is not specified, the embedded browser panel will be used.
In response to ANiChowy
Of course. Or if I may: duh.
In response to Kaioken
okay then so lets try that, and when i fail miserably, ill tell you :)
In response to Rushnut
GOTCHA

var
Welcome={"
<html>
<body>
<STYLE>BODY{background-color: red; color:black}</STYLE><font size="+1">
welcome<br>
<a href=?Cancel>Return</A>
</body>
</html>
"}

sotcdb={"
<html>
<body>
<STYLE>BODY{background-color: black; color:blue}</STYLE><font size="+1">
sotcdb<br>

<A HREF=?Help>Help</A><br>

<A HREF=?Welcome>Welcome</A><br>

<a href=?Cancel>Close</A><br>
</body>
</html>
"}

Help={"
<html>
<body>
<STYLE>BODY{background-color: red, color:black}</STYLE><font size="+1">
help me<br>
<a href=?Cancel>Return</A>
</body>
</html>
"}

Return={"
<html>
<body>
<STYLE>BODY{background-color: black; color:blue}</STYLE><font size="+1">
Goodbye!<br>
</body>
</html>
"}

client/Topic(href)
if(href=="Welcome")
usr << browse(Welcome,"window=sotcdb;can_close=0")
usr.sotcdbn=2
if(href=="sotcdb")
usr << browse(sotcdb,"window=sotcdb;can_close=0")
usr.sotcdbn=1
if(href=="Help")
usr << browse(Help,"window=sotcdb;can_close=0")
usr.sotcdbn=3
if(href=="Cancel")
if(usr.sotcdbn==2)
usr << browse(sotcdb,"window=sotcdb;can_close=0")
usr.sotcdbn=1
else if(usr.sotcdbn==3)
usr << browse(sotcdb,"window=sotcdb;can_close=0")
usr.sotcdbn=1
else
usr<<browse(null,"window=sotcdb")
mob/var/sotcdbn=0
mob/Login()
usr<<"<a href=?sotcdb>sdfasfds</a>"

Thanks for all your help! :D