refresh page

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Let me just start by saying taken over someones else code that they wrote just for them to understand(no comments, documentation NOTHING) is a task on in itself.
anyway, i have a page that needs to be refreshed every 10 seconds but not looses the item selected in the drop down, how and can it be done?

example:
drop down
user selects Football
i want all the scores to be refreshed every 10 seconds but not loose football as the selection. Currently if i pick football and the page refreshed it goes to the default which is baseball, it needs to stay on football if thats what im looking at.

thx
 
anyway, i have a page that needs to be refreshed every 10 seconds but
not looses the item selected in the drop down, how and can it be done?

Use a javascript to postback the page every 10 seconds.
 
You can do this by having the Page Post Back to itself using JavaScript.
Example:

<script type="text/javascript"><!--
function postBack()
{
document.forms[0].submit();
}
setTimeOut("postBack()", 10000); // milliseconds: 10000 = 10 seconds
// --></script>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

IGotYourDotNet said:
Let me just start by saying taken over someones else code that they wrote
just for them to understand(no comments, documentation NOTHING) is a task on
in itself.
anyway, i have a page that needs to be refreshed every 10 seconds but not
looses the item selected in the drop down, how and can it be done?
example:
drop down
user selects Football
i want all the scores to be refreshed every 10 seconds but not loose
football as the selection. Currently if i pick football and the page
refreshed it goes to the default which is baseball, it needs to stay on
football if thats what im looking at.
 
there is currently a function there like this but it's loosing the selected item in the drop down

Kevin Spencer said:
You can do this by having the Page Post Back to itself using JavaScript.
Example:

<script type="text/javascript"><!--
function postBack()
{
document.forms[0].submit();
}
setTimeOut("postBack()", 10000); // milliseconds: 10000 = 10 seconds
// --></script>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

IGotYourDotNet said:
Let me just start by saying taken over someones else code that they wrote
just for them to understand(no comments, documentation NOTHING) is a task on
in itself.
anyway, i have a page that needs to be refreshed every 10 seconds but not
looses the item selected in the drop down, how and can it be done?
example:
drop down
user selects Football
i want all the scores to be refreshed every 10 seconds but not loose
football as the selection. Currently if i pick football and the page
refreshed it goes to the default which is baseball, it needs to stay on
football if thats what im looking at.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top