I have a form with multiple fields I want to be able to mouse over the value on a field and fill the contents of another field with a value almost like a help pop-up but in an isolated location.
fielda - value
fieldb - value
help: value
so mouse over label fielda and value for help would change.
Does anyone have a sample of this?
HTML
Last Comment
weeezl
8/22/2022 - Mon
knightEknight
<INPUT type='text' name='field1' value='xyz' title='Help Text Goes Here'
onmouseover='this.form.helptext.value=this.value;' />
<TEXTAREA name='helptext'></textarea>
knightEknight
I used value becuase you requested it ... you could also use the title like this:
<script>
function fillHelp (help) {
var helpOutput=document.getElementById("output");
if (help==null)
help='';
helpOutput.innerText=help;
}
</script>
Input 1:<input type=text onmouseover="fillHelp('This is the help for Input 1')" onmouseout="fillHelp()">
<br>
Input 2:<input type=text onmouseover="fillHelp('Input 2 help goes here')" onmouseout="fillHelp()">
<br><br>
Help: <span id=output></span>
Hey Weeez could you hint me on how to get that field to say something before I mouse on the initial entry?
weeezl
Just put an initial value in HTML inside of the span. Any new value added through the function will clear it.
Input 1:<input type=text onmouseover="fillHelp('This is the help for Input 1')" onmouseout="fillHelp()">
<br>
Input 2:<input type=text onmouseover="fillHelp('Input 2 help goes here')" onmouseout="fillHelp()">
<br><br>
Help: <span id=output>Initial Help Value</span>
onmouseover='this.form.hel
<TEXTAREA name='helptext'></textarea