hi,
i have made a calculator with various input fields. What i would like to happen is that when a user clicks on a field an explanatory note appears on the right hand side (i.e. the "Notes" section) specific to the field the user has selected.
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
<input type="text" name="txt1" title="This is the description for txt1" onfocus="document.getElementById('notes').innerHTML=this.title" />
<input type="text" name="txt2" title="This is the description for txt2" onfocus="document.getElementById('notes').innerHTML=this.title" />
<input type="text" name="txt3" title="This is the description for txt3" onfocus="document.getElementById('notes').innerHTML=this.title" />
...
<div id="notes"></div>
I put the explanatory notes in the title attribute so that it shows as a tooltip when the user mouses over the field.