| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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> |
|
#2
| |||
| |||
| 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> |
|
#3
| |||
| |||
| 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 |
|
#4
| |||
| |||
| <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> |
|
#5
| |||
| |||
| 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. |
|
#6
| |||
| |||
| 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). |
|
#7
| |||
| |||
| I think you are totally right here |
|
#8
| |||
| |||
| 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. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.