Javascript Refreshed page does not bring back currentdata

This is a discussion on Javascript Refreshed page does not bring back currentdata within the Cold Fusion forums in Application Servers & Tools category; I have the following javascript below that closes the action page and then "refreshes" the referring page that the form (a popup) came from. However, I am finding that the referring page does not refresh with the data that was submitted via the popup form--I have to right click and reload the page. Is there a better way to refresh the page so that my submitted data is reloaded? Thanks! <cfoutput> <script language="javascript" type="text/javascript"> function closeRefresh() { window.opener.location.href='https://a_website.com/#url.opptyID#'; self.close(); } </script> </cfoutput>...

Go Back   Application Development Forum > Application Servers & Tools > Cold Fusion

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-01-2008, 11:50 PM
pnugent
Guest
 
Default Javascript Refreshed page does not bring back currentdata

I have the following javascript below that closes the action page and then
"refreshes" the referring page that the form (a popup) came from. However, I
am finding that the referring page does not refresh with the data that was
submitted via the popup form--I have to right click and reload the page. Is
there a better way to refresh the page so that my submitted data is reloaded?

Thanks!

<cfoutput>
<script language="javascript" type="text/javascript">
function closeRefresh() {
window.opener.location.href='https://a_website.com/#url.opptyID#';
self.close();
}
</script>
</cfoutput>

Reply With Quote
  #2  
Old 09-02-2008, 12:46 AM
BKBK
Guest
 
Default Re: Javascript Refreshed page does not bring backcurrent data

You need an event or button to run the function. I also think self.close() is
unnecessary. It could be as simple as

<cfoutput><button
onclick="location.href='https://a_website.com/#url.opptyID#';">Refreshed
form</button></cfoutput>




Reply With Quote
  #3  
Old 09-03-2008, 11:58 AM
fober1
Guest
 
Default Re: Javascript Refreshed page does not bring backcurrent data

Hi,

You are defining the function "closeRefresh", but where do you call it?

this should do it:

<cfoutput>
<script language="javascript" type="text/javascript">
window.opener.location.href='https://a_website.com/#url.opptyID#';
self.close();
</script>
</cfoutput>

cheers,
fober

Reply With Quote
  #4  
Old 09-03-2008, 03:13 PM
NeoRye
Guest
 
Default Re: Javascript Refreshed page does not bring backcurrent data

<cfoutput>
<script language="javascript" type="text/javascript">
function closeRefresh() {
var ts = new Date();
window.opener.location.href='https://a_website.com/#val(url.opptyID)#&ts=' +
ts.toString();
self.close();
}
</script>
</cfoutput>

Reply With Quote
  #5  
Old 09-05-2008, 02:44 PM
CF_output
Guest
 
Default Re: Javascript Refreshed page does not bring backcurrent data

This may or may not be related, but in the past I came across an issue with an
iframe in which I was passing it url variables. Occasionally, the page would
not be udpated despite continuing to click on a link to refresh the page.

The solution that I found, was to add a unique variable to the url, such as a
random number, to ensure that the browser recognizes that the url is a distinct
url, and it is not caching the page.

Reply With Quote
  #6  
Old 09-12-2008, 11:48 AM
Art of Zen
Guest
 
Default Re: Javascript Refreshed page does not bring backcurrent data

Hmmmm... I tried that but it would not reload the page correctly. I do not have edit rights to the page that needs to be refreshed (its a salesforce.com application).
Reply With Quote
  #7  
Old 10-09-2008, 07:36 AM
fargond
Guest
 
Default Re: Javascript Refreshed page does not bring backcurrent data

I think you are totally right here
Reply With Quote
  #8  
Old 10-09-2008, 08:02 AM
Dan Bracuk
Guest
 
Default Re: Javascript Refreshed page does not bring backcurrent data

I had a scenario where the parent page would refresh, but it would run it's select query before the records from the pop-up were inserted. I added a 100 msec timeout to solve that problem.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 03:31 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.