<form name=myform>
<input type=button value="Enter name"
onClick="
s=prompt('Enter your name','Name');
">
</form>
<BR>
[Click for name]
[Click for name]:
squiffy.set("name", "s");
Hello {name}
<p style="font-size:33px; color:red;"> Character Creation</p>
<hr><br><br><br>
Click the links below to create your character. <br>
[FirstName] <br>
[LastName] <br>
[FullName] <br>
<p></p>
<br>
[FirstName]:
$(document).on("click", "#enter-name", function ()
{
var person1 = prompt("Please enter your name", "");
document.getElementById("name1").innerHTML =
"Your first name is " + person1 + "";
squiffy.set ("globalfirstname", person1());
}
);
<button id="enter-name">Enter First name</button>
<p id="name1"></p>
[LastName]:
$(document).on("click", "#enter-name1", function ()
{
var person2 = prompt("Please enter your name", "");
document.getElementById("name2").innerHTML =
"Your Last name is " + person2 + "";
squiffy.set ("globallastname", person2());
}
);
<button id="enter-name1">Enter Last name</button>
<p id="name2"></p>
[FullName]:
Your Fullname is {globalfirstname + globallastname}.
squiffy.set ("globalfirstname", person1());
squiffy.set ("globalfirstname", person1);
[FullName]:
Your Fullname is {globalfirstname} {globallastname}.
set ("globalfullname", get("globalfirstname") + " " + get("globallastname"));
blood_exchange wrote:While you're working on this, I'm also trying to figure out how I could change the text depending on whether the user is male or female (such as male and female pronouns).
I don't want to copy/paste the whole entire thing with the different pronouns just to differentiate between guys and girls, but I also want to make it as personal as I can without forcing the person into a specific role.
@title GenderTokenExample
[Select Gender] <br>
[Select Gender]:
Are you [Male] or [Female]?
[Male]:
set("gender", "Male");
set("Boy/Girl", "Boy");
set("boy/girl", "boy");
set("Man/Woman", "Man");
set("man/woman", "man");
set("Sir/madam", "Sir");
set("sir/madam", "sir");
set("Lord/Lady", "Lord");
set("lord/lady", "lord");
set("handsome/pretty", "handsome");
[Continue]
[Female]:
set("gender", "Female");
set("Boy/Girl", "Girl");
set("boy/girl", "girl");
set("Man/Woman", "Woman");
set("man/woman", "woman");
set("Sir/Madam", "Madam");
set("sir/madam", "madam");
set("Lord/Lady", "Lady");
set("lord/lady", "lady");
set("handsome/pretty", "pretty");
[Continue]
[Continue]:
@clear
<IMG SRC="http://i162.photobucket.com/albums/t244/Dimbobx/Dimbobx102/PORTRAIT_Alaree13diana_zpsi0rhvzks.jpg" WIDTH=200 HEIGHT=260>
<br>
<br>
"Ugh! What a hideous looking {man/woman} you are!
"Don't look me in the eye, you bold {boy/girl}!"