[Phpwm] possible?

Phil Beynon phil at infolinkelectronics.co.uk
Wed Mar 28 00:38:53 BST 2007

> 'field' and 'image_id' refer to the id attributes of the input and the
> image respectively (your page has 'text1'),

That was me being sloppy! I chucked a page up which I hadnt read through
properly - sorry about that!

> 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;
>   }
> }

Interesting, that works but it doesn't have the immediacy that I would have
thought, the title tag value doesn't get updated until there is a click
somewhere on the page despite the onchange being attached / used.

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

Ok! :-)

> Greg
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm

More information about the Phpwm mailing list