PFFFFFFFFF IM TRIGGERED.
Been working on hours on this and still can't get it to work correctly.
Here is my Javascript.
if (typeof window.CustomScripts == "undefined") {
window.CustomScripts = {
updateVariable(inputDefend) {
// Get the value from the input textbox at time of click.
var value = $("input[name='" + inputDefend + "']")[0].value;
// Update the variable.
State.variables[inputDefend] = value;
}
};
};
(css is empty)
And here is Passage A(Defend)
<input id="Defend" name="Defend" value="">
<button type="submit" onclick="CustomScripts.updateVariable('Defend')">Defend!</button></center>
[[Attack]]
And here is passage B(Attack)
$Defend
Did it work???
[[Try again|Defend]]
I can't get the text box to be selected on page start up, and things like [autoselect="autoselect"] make it so that the textbox is selected for one second and then stops, doing more harm than good. How do I bypass this?