DMXzone Database Connector ASP Support Product Page

Answered

Filter by catergory or ALL

Asked 26 Nov 2014 22:56:01
1
has this question
26 Nov 2014 22:56:01 Baub Eis posted:
I want to create a page that has a record set that will be filtered. so something like this

www.mydomain.com/index.html?category=music

Ok so that is easy.

but I want the same record set that if it doesn't have a search criteria I want it to display all of the results, Similar to the "ALL" argument in sql.

So if the page loads is

www.mydomain.com/index.html and I don't pass anything else that I want it to load the entire db call with "ALL" of the categories?

Should be simple, right?

thanks

Replies

Replied 27 Nov 2014 09:38:17
27 Nov 2014 09:38:17 Teodor Kuduschiev replied:
Hi,
When you are using a URL variable to filter the results this is not possible.
Workaround:
1. You create another data source, which is not filtered, but returns all of the results. Then you use the data-show / data-hide attributes to SHOW it when there is no URL variable and hide it when there IS a URL variable in the url.
or
2. Filter the results on the same page, the AJAX way
Replied 01 Dec 2014 21:49:02
01 Dec 2014 21:49:02 Baub Eis replied:
Ok, so I can kind of get this to work. I can get either way to load correctly using the show hide attributes. But I need the data sets to populate a google map. How do I do that? I've tried to show hide <div> with the jquery scripts but it looks like it fires both scripts. I need to show all of the data markers on a map or just the ones from the query string catagory?

Reply to this topic