Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REFRESHING A DROPDOWN WHEN CLICKING BACK - help

Status
Not open for further replies.

kingjjx

Programmer
Sep 18, 2001
181
US
Hi, I have a query page with a dropdown list.

I want it so that everytime the user sees the search results and clicks the BACK button, it will automatically refresh the query page or the drop downlist.

How do i do this ?
right now, everytime a user clicks the back button the previous chosen dropdown item is still chosen. and i want it refreshed.

thanks
-jon

 
set the caching to no-cache:
the ASP version is below:

add the code and chage the extension of the pasge from .htm to .asp
<%
Response.Expires = 15
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader &quot;pragma&quot;,&quot;no-cache&quot;
Response.AddHeader &quot;cache-control&quot;,&quot;private&quot;
Response.CacheControl = &quot;no-cache&quot;
%>

hth

Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
hey, i cant change to page to .ASP since its a .CFM page (coldfusion)

any other advice?
thanks
 
Use the javascript refresh() function in the body onload event
 
u could use the no cache meta in your &quot;DROPDOWN&quot; page
Code:
<meta HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>
tell me if this dont do the job... ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
check any Coldfusion book on Headers, there shouls be meta tags and probably some cfm script to set the cache to no-cache and expire the page some time in the past.
Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Hi !!
I still need help on this. so far none of the answers worked yet.

-j
 
&quot;answers worked yet&quot;
have u tried ? ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
There's a simple way to do this:

<body onload=&quot;document.formName.reset()&quot;>

The reset() method restores a form element's default values.

If you want to reset only <select> element then you can specify what exactly option should be selected by default:

<body onload= &quot;document.formName.selectName.options[n].selected&quot;>
Write the desired item number instead of n.

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top