JS interactivity Question

Summa_Civis
15 Nov 2022, 12:53I have three HTML hyperlinks under an anchor tag from an external file that I was able to add through a getfile function in Quest. I'm really new to JS and I'm stuck at the moment trying to use these external hyperlinks where they onclick send the player into a new room in the game. How do I communicate with Quest to perform this onclick event using the external HTML elements?
Thanks,
Summa
The Pixie
15 Nov 2022, 21:10A while since I have done this, but I think the onclick needs to call ASLEvent, with two string parameters; the name of a Quest function to call and a parameter to pass to the function
<a onclick="ASLEvent('ProcessButtonClick', 'enter house')">Enter the house</a>

Summa_Civis
16 Nov 2022, 00:21I'm not quite sure how to use this line of code or where to use it. Are there steps before and after that I have to perform? I tried to make it work by adding it to the specific room script but I don't think I'm doing correctly. My skills at html, css, and javascript are very beginner level. My player, (game,pov) is currently in a room labeled, "Start Screen", which is just the title of the game. I want to be able to click on a "Game Start" button that moves the game.pov to the "Character Select" room.
The Pixie
16 Nov 2022, 07:40That code is HTML; it goes in your HTML file and creates a link. When the player clicks the link, Quest will react as though you did this:
ProcessButtonClick('enter house')
You will therefore need a ProcessButtonClick
function in your game, with a single paramter. I suggest getting it to just print the parameter to screen as a first step.
Docs for functions here:
https://docs.textadventures.co.uk/quest/functions.html

Summa_Civis
16 Nov 2022, 14:41Pixie you are amazing!! It worked!!! I am so grateful for your help!
What is really funny is that working in the hmtl file was my first hunch because of the tags but instead I kept trying to add the entire ProcessButtonClick codeline in the editor instead. I kept modifying the code to the point of frustration and forgot all about trying to modify the html file altogether.
Again, I am greatly appreciative of your help!