ID:264672
 
I've completely made my HTML page, I just am having a hard time using html as a button to close out the page.

Pretty much I want it like in text you click. "ENTER" and it closes out the pop up.

I'm using the typical :
usr << browse(html_doc,)
method.

I want something like this

Code:
mob<<browse(null,"window=X")


But instead of a line of code, I want it to fit into the HTML as a Button of Text.

So, in simple.

A click-able button on the pop up window that is displayed on the page that closes out the entire page.
The way I did it was to add this to the test in the browser:

var/T="<a href=\"?CloseBrowser\">\[Close This Window]</a><br>"



To create the link.

Then add this:

client/Topic(href,href_list[],hsrc)
if(href=="CloseBrowser")
usr<<browse(null)
winshow(usr,"browserwindow",0)


To make it function. The hyperlink has a command embedded in it called CloseBrowser, and you add the functionality of the command in the client/Topic proc.
In response to Gunbuddy13
Obviously replace "browserwindow" with whatever the name is of the window in your skin that contains the browser.
In response to Gunbuddy13
Well, that's if he is using a skin.

Otherwise, it'll be
usr<<browse(null, "window=browserwindow")

rather then

usr<<browse(null)
winshow(usr,"browserwindow",0)
In response to HolyDoomKnight
Thanks both of you, worked like a charm.