function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bob BaileyBob Bailey 

Changing Jeff Douglas' Dynamic Search to Button Click

Hi,

 

Hats off to Jeff Douglas for this wonderful piece of work. I've use it successfully more or less as is.

http://blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/

 

I now have a search that really needs to be button driven, partly from a combo of fast typing and huge amount of data.

 

It seemed to me that "all I had to do" was:

  • Create a button with onclick="doSearch();"
  • Remove onkeyup="doSearch();" from the search criteria fields
  • fill the fields and click the button

Clearly not. I have gotten mixed results. The search doesn't happen. Sometimes it appears that the page is re-entered after the search is done and the page is rendered. That is,

  • fill the fields and click the button
  • Page is rerendered
  • Page is rerendered again

I can see this in the logs. The soql string has the search parameters: "and Contributor__r.firstname LIKE 'ag%"

 

Moreover, if I have a "mixed" page with the button and the onkeyups the search works.

 

Any experience with changing Jeff's code to button click? Any ideas what I am doing wrong?

 

Thanks in advance... Bob

 

Marcio Zima.ax1538Marcio Zima.ax1538

I'm having the same issue. Due to the delay of the search, It would be useful if the action just worked after a click on a button.

 

No solutions yet?