postback and refresh!

F

francois

I have a ASPX form with a dropdownlist that makes a post back (to the same
page of course, just a normal asp.net postback)

That page also has an auto refresh javascript as it needs to refresh its
data automatically.

The problem is that when i click on the dropdownlist, i post back
information to the page, then after that the next refresh will brin me a
alert message populated by internet explorer saying:
"The page cannot be refreshd without resending the information. Click Retry
to send the information again, or click Cancel to return to the page that
you were trying to view."

I assume that IE, detects that the last request was a FORM POST (HTTP POST)
and then will automatically display this.

Is there anyone who knows how i can avoid this? I need to refresh the page
without this message appearing in the case i change the value on my
dropdownlist. And somehow my page need to reload through a postback or some
other way as I need to display some information that differs.

I hope this is clear enough, if not I will reformulate

Best regards,

Francois
 
E

Eric Lawrence [MSFT]

What does your auto-refresh Javascript look like?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
 
F

francois

like the following, but it is mainly a counter that will call :
window.location.reload()

<script>
<!--

var limit="0:30"

if (document.images){
var parselimit=limit.split(":")
/*
Auto Refresh Page with message in the footer
*/

parselimit=parselimit[0]*60+parselimit[1]*1
}

function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page
refresh!"
else
curtime=cursec+" seconds left until page refresh!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
//-->
</script>
 
E

Eric Lawrence [MSFT]

Rather than triggering a reload, why not trigger a postback instead?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

francois said:
like the following, but it is mainly a counter that will call :
window.location.reload()

<script>
<!--

var limit="0:30"

if (document.images){
var parselimit=limit.split(":")
/*
Auto Refresh Page with message in the footer
*/

parselimit=parselimit[0]*60+parselimit[1]*1
}

function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page
refresh!"
else
curtime=cursec+" seconds left until page refresh!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
//-->
</script>

Eric Lawrence said:
What does your auto-refresh Javascript look like?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,125
Latest member
VinayKumar Nevatia_
Top