Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

input type "search" and onChange

Author Message
seb2



Joined: 04 May 2005
Posts: 41

Posted: Wed May 04, 2005 - 6:21 pm    Post subject: input type "search" and onChange Reply with quote

Hi everybody,

I do use an input of type "search" in my widget. The "onSearch" does get called correctly, but "onChange" doesn't get called.
Is there any way to get this to work? Or am I just making a stupid mistake?

The code I use is this:
Code:
<input id="searchInput" type="search" size="13" placeholder="iTunes" results="0" onSearch='processRequest(this.value);' onChange='processRequest(this.value);'>


Thanks for any help
View user's profile Send private message Send e-mail Widgets
sean



Joined: 22 Apr 2005
Posts: 67
Location: Duluth, MN

Posted: Wed May 04, 2005 - 6:40 pm    Post subject: Reply with quote

I think what you want is an 'incremental' search. Just make it look like this:

<input id="searchInput" type="search" incremental size="13" placeholder="iTunes" results="0" onSearch='processRequest(this.value);'>

And it will search every time a letter is added to, or deleted from, the search box.
View user's profile Send private message Send e-mail Visit poster's website Widgets
seb2



Joined: 04 May 2005
Posts: 41

Posted: Wed May 04, 2005 - 6:45 pm    Post subject: Reply with quote

Wow. I didn't expect to get help so quickly.
This does exactly what I wanted. Thanks!

May I ask where you found that precious detail?
View user's profile Send private message Send e-mail Widgets
sean



Joined: 22 Apr 2005
Posts: 67
Location: Duluth, MN

Posted: Wed May 04, 2005 - 6:50 pm    Post subject: Reply with quote

No problem. I read about it here:

http://weblogs.mozillazine.org/hyatt/archives/2004_07.html#005890

I can't remember what I was looking for at the time I found that ^, but the page has some good details on new changes to Apple's webkit.
View user's profile Send private message Send e-mail Visit poster's website Widgets
seb2



Joined: 04 May 2005
Posts: 41

Posted: Wed May 04, 2005 - 6:56 pm    Post subject: Reply with quote

Thanks for the URL!
View user's profile Send private message Send e-mail Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group