View Full Version : can this be done ???

12-15-2004, 02:29 AM
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.


N.B. There aren't any input fields in the above link yet


12-15-2004, 05:19 AM
<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.