So right now I have a browse user page that lists all of the logged in users on my site. If you are looking for a particular person you can enter their name and location in a single search box (views2 exposed search box filter) at the top of the page.
What I want to do now is:
If someone searches but does not find the person listed on my site-
1. the page either automatically runs a query on a Google custom search that I already have set up for the same info.
and/or
2. displays the Google custom search box and removes the original views2 search field. (I'm think a redirect to a new Google Custom Search page on a no result)
I know these are possible to do but I just need a point in the right direction. I would love to be able to do #1 above but will settle for hel with #2 in the mean time.
Any help would be very appreciated.
Cheers,
Latte/
Comments
Consider using the "Empty
Consider using the "Empty Text" to embed the logic and produce the display.
yeah right now I have the GCS
yeah right now I have the GCS search form in the Empty Text. I might drop some javascript in there to change the the visibility of the views form to hidden or display none. I just have to figure out how to do that.
I'm more of a UI designer than a developer, but I have gotten this far (Cup half full).
Cheers,
Latte/
OK I did it
I was able to hide the Views search form with the following Javascript.
I added that to the Empty Text area in Views2 and it did the trick.
How about a jQuery approach
How about a jQuery approach
I just tried you code and it
I just tried you code and it didn't seem to work.
I put it in the no text field and set it to HTML (also tried PHP) and nothing happened.
I ran a search that returned no data and the views form was still there.
Latte,