You are here: Re: problem fetching value of <input type="text"... « HTML « IT news, forums, messages
Re: problem fetching value of <input type="text"...

Posted by Steve Pugh on 11/30/05 13:25

Smugsboy wrote:
> Got a problem here, hope someone can help.
> I want to fetch edit box's (<input type="text"...) value string upon
> change. What I do is I attach handler to the onkeypress event. I have
> two issues with this:
>
> 1. When the onkeypress handler executes I do not get the latest char
> that was pressed (if the 't' char for "cat" was pressed I'll only get
> "ca"), this is true for both IE & Firefox. Is there any solution to
> this ? I need a solution that will work both on IE & Firefox.

Depends on the order of events I suppose. Looks like the keypress event
takes place before the content of the input is changed. the onkeypress
event isn't really the best tool for the job...

> 2. Is there a more through event I should attach to ? because using
> only the onkeypress I miss copy-paste operations.

onchange

Steve

 

Navigation:

[Reply to this 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

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