Good day! I've got a problem with my code. We all know that we can only get the value of a <select>
or dropdown through POST and GET method (in submit button) and document.getElementById
(in <button>
and pass it through ajax to use it on PHP), my problem is I want to use <a>
tag because I'm going to generate or download an excel file (using PHPExcel) from the href
attribute of the </a>
, the data that will be processed and download by the link will be filtered based on the value of the <select>
, so is there any possible way to get the value of <select>
, process it on the page wherein <a>
will be redirected? Thank you!
Asked
Active
Viewed 299 times
0

Niel Sinel
- 291
- 2
- 6
- 15
-
possible duplicate of [javascript selected value](http://stackoverflow.com/questions/5416767/javascript-selected-value) – chris85 Aug 05 '15 at 01:32
-
1Of course it's possible. Share with us what you have tried. – Jay Blanchard Aug 05 '15 at 01:32
-
What do you mean 'from the href' attr? Is there a query string in the href value that you want to pull values from? – dlporter98 Aug 05 '15 at 01:33
-
Use javascript to add the parameter to the querystring in the href parameter. – Jon P Aug 05 '15 at 01:35
-
I mean the link itself, for example, I have a PHP file `form.php` that contains an `` and a ` – Niel Sinel Aug 05 '15 at 01:38