Hello everyone,
I want my visitors when they have finished their search to be able to start a new search from the beginning of the original code process.
I have a user input where user input a year then a clickbutton that trigger a query and shows the result in a table. From that result, user select an option and click again on another clickbutton that start another query that shows results on different tables : from that point, if they wish to get results for another year it needs to go back to the 1st step of the process as these infos are in fact a selector and without them results are going to be wrong.
I was thinking to add a button with ' start a new search' text that clicked will restart the whole process. IS that possible? And how can it be done?
Thanks and best regards,
Thierry
Just use $w('#dataset1').setFilter() to clear it.
You can have a CLEAR button that resets the fields in the onClick() function.
To clear all of your filter selections, add the following onClick() function to your CLEAR button:
export function button1_click(event, $w) { //Add your code for this event here: $w("#selection1").selectedIndex = 0; // add code for other selection menus }
The above routine just needs to set all of the selection menus to the default value.
Or you can clear the year input box when the page is ready:
$w.onReady( function() { $w("#yearinput").value=""; } );
Hi,
Please send me a URL to your site and specify the name of the page.
Thanks,
Sapir
Hi,
Can you be more specific in describing the flow.
I don't understand if both buttons and user inputs are in the same page or each table is presenting in different page?
and should different year present different result ? why not to go beck to step 1?
Best,
Sapir