Reply to Re: Any way to apply oncontextmenu and title values to ALL images?

Your name:

Reply:


Posted by Andy Dingley on 07/24/06 16:30

Chris Tomlinson wrote:

> We have about 30 images on a page, and want to apply something like this to
> all of them:
>
> < ... oncontextmenu="alert('Message here.');return false;" title="Another
> message here." ... >

Use subroutines, not pages of inline code.

Write subroutines that are context-intelligent, i.e. they can tell
which event and DOM node triggered them and react accordingly, they
don't have to have a squillion parameters passed in through the inline
event handler call.

Use event listeners.

Read any modern book on modern JavaScript techniques (probably one
blathering about AJAX too)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация