Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Javascript:
- if (typeof window.CustomScripts == "undefined") {
- window.CustomScripts = {
- updateVariable(inputName) {
- // Get the value from the input textbox at time of click.
- var value = $("input[name='" + inputName + "']")[0].value;
- // Update the variable.
- State.variables[inputName] = value;
- }
- };
- };
- Passage Code:
- "What is your name?"
- "My name is...
- (set: $fname to "")
- <input type="text" name="fname" value="">
- <button type="submit" onclick="CustomScripts.updateVariable('fname')">yes...that is my name...</button>"
- (if: $fname is not "")[[Proceed->Act 0: Class Select]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement