Tommy B
Posts: 0
Joined: Sat Sep 15, 2012 3:39 am

clear database service request

In my app I have built a search function that pulls from a tiggzi db and displays results in a list as described in the tiggzi docs video tutorial. what I would like to do is have a button that resetsts the screen kind of like a" clear" button. looking for some JavaScript or built in function.

Jonathan Clark
Posts: 0
Joined: Thu Mar 14, 2013 5:25 pm

clear database service request

Couple suggestions I could think of just off the top of my head....

  1. create a button that sets the where clause of your query service to something that would return no results

  2. User the javascript replacewith() function to select the ul list item div and remove all the returned li elements.

    Hope that gives you some ideas

Tommy B
Posts: 0
Joined: Sat Sep 15, 2012 3:39 am

clear database service request

I built the page following these instructions.
http://docs.tiggzi.com/tutorials/buil...

the where statement is set in the backend with the REST service. Do you know if I can set the "where" statement using java in the onclick event?

Tommy B
Posts: 0
Joined: Sat Sep 15, 2012 3:39 am

clear database service request

So for now i'm using this.

Tiggzi ('industrytype_input').val("#foo");
rest2011naics.execute({});
Tiggzi ('industrytype_input').val("");

Im sure its not the correct way but it works.....for now.

Anyone have any other ideas?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

clear database service request

That's the right approach. Set any input fields you need to empty or default vales.

Return to “Issues”