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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

page not updating?

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
Hello all!

I have created a .cfm which deletes / adds records to a DB table via users selecting / deselecting check boxes. The page is viewed in a child window and each time they enter the page, their previous selections are already checked.

The page works fine and the update is completed but if the user re-enters the page to modify their selections, the page shows their old selections even though the list looks at the updated table. To view the page as it should be, you have to manually refresh the page via right-clicking and selecting 'refresh' even though you have just opened it ??

Does anyone have any idea how I can avoid this problem and explain why this is happening???

Thanks very much

Rachel
 
There are two pages loaded in the child window -
...one that contains the list that isn't reloading correctly / loading the cached version
...and the second which updates a DB table with the forms data (from the first page) and reloads and closes the child window.

I have added '<body onLoad=&quot;reload();&quot;>' as suggested to the first page but there is not change

Any further advice would be really appreciated

Thanks

Rachel
 
Aha, now I see. Well, where you have that JavaScript, try making that a function that the window in which the user changes his/her selections calls when the submit button is clicked.

In other words:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
function reloadWindow() {
parent.frames.location=&quot;template.cfm&quot;; target=&quot;framename&quot;
}
// -->
</SCRIPT>

where is the index of the frame to be reloaded (I believe the topmost parent frame is zero ?) and template is the cfm file to be reloaded and framename is the name of the frame that it needs to be reloaded in.

Call this using an onClick event at the submit button, like:

<input type=&quot;Submit&quot; name=&quot;Submit&quot; value=&quot;Change Selections&quot; onClick=&quot;reloadWindow();&quot;>


John Hoarty
jhoarty@quickestore.com
 
Hmm, my &quot;left bracket, i, right bracket&quot; became the forum TGML symbol for italics. Should've unchecked &quot;Process TGML&quot;. It's like this:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
function reloadWindow() {
parent.frames.location=&quot;template.cfm&quot;; target=&quot;framename&quot;
}
// -->
</SCRIPT>

Where is the index of the window, etc., etc., so yours might be parent.frames[0].location, or child.frames[1].location or child.frames[0].location. I don't know. I'm betting you have a better handle on that than I do. But I think this will work. John Hoarty
jhoarty@quickestore.com
 
I am unsure what you mean as frames are not being used within the child window. Does this script still apply?
 
Well, I guess when you said &quot;There are two pages loaded in the child window&quot;, I assumed you had frames. It could still apply, but I am confused. If they are loaded one at a time, and if one of them simply requires reloading for everything to work, then my simple <body onLoad=reload();> scriptlet should work just fine if you put it in the body tag of the page that, when reloaded, makes everything work. John Hoarty
jhoarty@quickestore.com
 
I have just tested my application on other machines and it DOES work on some but not on others:
THE RESULTS....

my machine(NT 4.0 Workstation) - doesn't work
98 (two machines) - works
2000 (one machine) - works
NT 4.0 Workstation (one machine) - Doesn't works

At this point I thought that it might be a problem with NT but...........

NT 4.0 Workstation (one machine) - works!!!!!!

Since my last message, I did add: CACHEDWITHIN=&quot;#CreateTimeSpan(0,0,0,1)#&quot;
to the <CFQUERY> to ensure that the query results weren't being cached so this may have solved part of my problem but WHY would the application run correctly from other machines?

All machines have IE 5 and I have thoroughly checked all settings in IE against those on one of the machines where the application works fine.

I am totally confused - Help would be REALLY appreciated

Thanks
 
if i set up a list box that pulls a list from a database and a user is suposed to pick something from the list. how do i do a cfinput of what is selected to a different form
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top