link in textarea - pint in it for you

admin

Administrator
Staff member
Hi guys.

In the code below I want say, "Banana", to be clickable so the user can click on it and banana.html will open in a new window.

Can this be done or as anyone got a better script?

Thanks all in advance

<HTML><head>
<script language = "javascript">

//

qList = new Array();
qList[0] = ["Do you like Mangoes?", 1, 2];
qList[1] = ["Then go and buy Mangoes.", 0, 0];
qList[2] = ["How about Bananas?", 3, 4];
qList[3] = ["You're a monkey!", 0, 0];
qList[4] = ["Go, Starve to death", 0, 0];
curQ = 0;


function askQuestion(i) {
curQ = i;
form1.question.value = qList[0];
if (qList[1] == 0) {
// you can put your ending functions here
}
}

function showYes() {
askQuestion(qList[curQ][1]);
}

function showNo() {
askQuestion(qList[curQ][2]);
}


///
</script>
</head>
<body onload="askQuestion(0)">
<form name = "form1">
<textarea name = "question" cols = 50 rows = 3 onchange = "validate()"></textarea>
<input type = "button" name = "yesButton" value = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"YES" onclick = "showYes();">
<input type = "button" name = "noButton" value = "NO" onclick = "showNo();">
</form>
</body>
</HTML>
 
Back
Top