Uber_Tiny
New member
Below is the code I am working on for work. For the life of me I can not figure out how to put a new line in the text.
Like so:
Thank you contacting us.
We are glad to blah bah blah.
Again thank you for contacting us and so on and so forth.
Code is below:
If I keep it all together without hitting the enter button it all works, but that just isn't what I am after. It needs to be spaced out.
Any help is greatly appreciated.
Like so:
Thank you contacting us.
We are glad to blah bah blah.
Again thank you for contacting us and so on and so forth.
Code is below:
Code:
<html>
<head>
<title>Canned Messages of Doom</title>
<script language="javascript" type="text/javascript">
var canned = new Array();
var cannedtxt = new Array();
canned[0] = "Auto Responses"
cannedtxt[0] = "[COLOR=Red]Thank you contacting us.
We are glad to blah bah blah.
Again thank you for contacting us and so on and so forth.[/COLOR]";
canned[1] = "Title 2"
cannedtxt[1] = "Tacos";
canned[2] = "Title 3"
cannedtxt[2] = "Nipples";
function loader() {
o = document.getElementById('selector');
for (x=0; x < canned.length; x++) {
o[o.length] = new Option(canned[x], x);
}
}
function selector(x) {
document.getElementById('textytext').value = cannedtxt[x];
}
</script>
</head>
<body onload="loader()">
<center>
<font size="12">Canned Reponses</font>
<table border="1">
<tr>
<th>Script Selector</th>
<th>Script</th>
</tr>
<tr>
<td><select id="selector" size="20" onchange="selector(this.value)"></select></td>
<td><textarea id="textytext" rows="20" cols="60" readonly="readonly"></textarea></td>
</tr>
</table>
</center>
</body>
</html>
Any help is greatly appreciated.