0

I am implementing a data recordset table.

I would like to create 2 radio buttons for user selects the option to control my data table.

For example, the radio buttons are: (imagine the interface as describe below)
- View by Month: ['month' drop-down list] - ['year' drop-down list]
- View by Date: Start Date: [date picker] to End Date: [date picker]

If my customer want to view the table with March only. He needs to select [View by Month] radio button, and then select month and year drop-down list.

If my customer want to view certain date of periods, she needs to select [View by Date] radio button, and then pick the date on the box (I assume Javascript

I have search round the Q&A in stackoverflow, but have no idea which one suitable to implement into my codes that written in PHP, I have no Javascript nor jQuery knowledge, I hope can get a simplest solution.

I want to pass this parameter to a URL and retrieve the data recordset onto my page.

1 Answer 1

0

You would either have to use Javascript to take the values of the select inputs and generate an Ajax request to build the correct results

or

Turn the options into a proper form and provide a submit button which will post the values to a particular script which will build the results and then render the same page containing the amended results.

Check out jQuery. The docs are fairly straight forward and will give you a good opportunity to see how to achieve even more awesome stuff using javascript.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.