I am using HTML, Javascript and CSS to code my pages.
I want to reload the same page upon selecting an option to get data from mysql tables depending on the option.
this is my sample code:
Expand|Select|Wrap|Line Numbers
- //javascript function
- function changeSelectAction(form)
- {
- //form.action = 'det.php';
- document.forms['form-name'].action = 'det.php';
- }
- //html code
- <select name = "cli" onchange="return changeSelectAction(this.form);">
- <option value = "X">X </option>
- <option value = "Y">Y </option>
- <option value = "Z">Z </option>
the form data should go in POST method.
Where am I going wrong here???
Need suggestions or comments to solve this problem.
regards
Nelluru