Link to home
Start Free TrialLog in
Avatar of DoDo1975
DoDo1975

asked on

Refresh page onChange event of listbox

I have a listbox on a page, I want to refresh the page (to populate another listbox) when the user changes the value of this listbox.  I cant seem the get the right onChange event to make it work.

Any help?
Avatar of hongjun
hongjun
Flag of Singapore image

<select onchange="self.location.reload()">
ASKER CERTIFIED SOLUTION
Avatar of neeraj523
neeraj523
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lionellim83
lionellim83

To my knowledge, I don't think you can do that unless you set a timer and request for the listbox to be updated every few seconds which would be impractical - too much traffic. I would put a refresh button next to the list box. Before the user selects a value, he/she may click on the refresh button to verify that the list is up to date. Within the code for the list box, insert an onchange=refresh() and insert the following code to the top of code together with all the other functions.

<script type="text/javascript">
function refresh()
  {
    location.reload()
  }
</script>
Helloo DoDo1975

no inputs for this question..

Either close this question or ask experts for any further issues..

neeraj523
Avatar of DoDo1975

ASKER

How do I close it without accepting an answer?
Hello

I am wondering what else you were looking from experts ?? I guess you already got sufficiant number of solution to ur problem. you should accept a reasonable answer for u out of these solutions..

If still u think.. u r looking for more help.. u can ask experts for further assistance.

Well.. if u r sure.. u want to close this question.. u can add a request in community section to delete this question.. But personally.. i feel it will discourage experts to give u solution in ur future problems..

anyway.. all the best..

good bye

neeraj523