JS in Login() in Developer Help
|
|
Last one for a while, I promise
Problem description:
I'm using FA's interface library so I can use JS in my browser and whatnot. Using rudimentary JS know-how I have made this.
mob
Login() src.NewScreen = 1 OP = new(src,"Main","OP") OP.HTML(
{" <html> <head> [JS2DM(src)] <script>
function addHTML(text) { var div = document.getElementById("OP"); div.innerHTML += text; }
</script> </head> <body bgcolor = "black" text = "white"> <div id="OP"></div> </body> </html> "} ) OP.JavaScript("addHTML","Welcome to Retro RPG. To use commands, type them in the commands bar (located at the bottom of your screen). \ What would you like to do today? Create a new character (Command: Creation) or Load an existing character? (Command: Memory)")
|
Using a verb to call JavaScript seems to work fine, but I when I put OP.JavaScript("addHTML","blah") right after the "browser setup", it doesn't work. I know the line is being reached. So does anyone know why this isn't working?
Note: The browser has been defined as OP.
|