Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Refresh page onChange event of listbox

Posted on 2004-04-26
6
Medium Priority
?
1,485 Views
Last Modified: 2008-01-09
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?
0
Comment
Question by:DoDo1975
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 10924313
<select onchange="self.location.reload()">
0
 
LVL 22

Accepted Solution

by:
neeraj523 earned 150 total points
ID: 10925692
Helloo

Try this..

===================================================
<SCRIPT Language="JAVASCRIPT">
function refreshPage(obj)
{
  str = obj.value
  location.href = "urPage.asp?id=" + str
// This will call same page with a value selected in list 1 to populate secodn list box..
}
</SCRIPT>

<select onchange="refreshPage(this)">
</select>

<%
if Request.QueryString("id") <> "" Then
%>
<select name="seondlistbox">
</select>
<%
End if
%>
====================================================

hope it will work for u..

neeraj523
0
 
LVL 1

Expert Comment

by:lionellim83
ID: 11064276
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>
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 22

Expert Comment

by:neeraj523
ID: 11471732
Helloo DoDo1975

no inputs for this question..

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

neeraj523
0
 

Author Comment

by:DoDo1975
ID: 11473841
How do I close it without accepting an answer?
0
 
LVL 22

Expert Comment

by:neeraj523
ID: 11477629
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

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question