First of all, apologies for the low level of Javascript I'm about to post. I just started playing around with it in my spare time last week to set something up to make my life at work easier.
In a nutshell, I work at a call centre. At the end of each call I have to enter notes into the system. I wanted to create a HTML page where I can simply click a few things and the notes will be ready for me to cut and paste. I'm now playing with drop down menus instead of a billion buttons.
I have a function that is triggered on a button press, which I'd like to then enter text into a textarea based on the selection from a drop down menu. For some reason (that I can't find an answer for), the text appears and then instantly disappears.
Here's my function:
function openCall() {
var callerselection = document.fsnotes.caller.value;
if (callerselection = "CH") {
document.fsnotes.notesentry.value += "CH called ";
}
}
Here's the Form:
<form name="fsnotes">
<textarea rows="8" cols="50" name="notesentry"></textarea>
</br>
<select name="caller">
<option>CH</option>
</select>
<button onClick="openCall()">OK</button>
</form>
Naturally I have a lot more in my main html file, I just have this smaller one to test new ideas in, as a lot of people in my department are now using the one with a billion buttons.