[Phpwm] possible?

Greg Jones greg.jones at gmail.com
Tue Mar 27 16:59:16 BST 2007


'field' and 'image_id' refer to the id attributes of the input and the
image respectively (your page has 'text1'), and the function itself
attaches the onchange, so your HTML doesn't need to. You do need to
run it on window-load though:

window.onload=function() {
  $('text1').onchange=function() {
    $('image_id').title=this.value;
  }
}

where $=document.getElementById because I'm lazy and always typo it.

Greg



More information about the Phpwm mailing list