ID:161377
 
I made a html page using ,

usr << browse(Body,Options)

now I want to link that page with another one of

usr << browse(Body,Options)

(Do these pages have names ? i know how to connect them in html but i don't think they have page names? )

well if you can help plz help :)
You'll want to look up Topic() for this. It handles the hyper links in your game.

I also have a demo that I made for myself when I was learning the subject. Play around with it after you peek at the reference, as it doesn't cover all of what Topic() can do. =)

menu
var/list/pages=list(
"main"={"
<html><head></head><body>
<a href="?action=viewpage;page=main">Main</a>
<a href="?action=viewpage;page=help">Help</a>
<a href="?action=viewpage;page=credits">Credits</a>
<p>Welcome to the menu.
</body></html>
"}
,
"help"={"
<html><head></head><body>
<a href="?action=viewpage;page=main">Main</a>
<a href="?action=viewpage;page=help">Help</a>
<a href="?action=viewpage;page=credits">Credits</a>
<p>Click the menu verb and go to the help tab for help.
</body></html>
"}
,
"credits"={"
<html><head></head><body>
<a href="?action=viewpage;page=main">Main</a>
<a href="?action=viewpage;page=help">Help</a>
<a href="?action=viewpage;page=credits">Credits</a>
<p>YMIHere
</body></html>
"}
)

client/Topic(href,list[])
if(list["action"]=="viewpage")
usr<<browse(Menu.pages[list["page"]], "window=popup;size=400x200")
if(list["action"]=="call_print_hi")
mob.printHi()
..()

mob/verb
menu()
src<<browse(Menu.pages["main"],"window=popup;size=400x200")
src<<{"<a href="?action=call_print_hi">Click here</a> to print hi."}
printHi()
world<<"Hi!"

var/menu/Menu
world/New()
Menu=new
In response to YMIHere
tyvm :)


also is there way for icons to appear in this browser thingy <_<
In response to Domedaydevice141