function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
eswarieswari 

Page refresh

Hi,

 

In my apex page I have a link which on click will show a popup. Once I get the popup, I just went to another browser and came back to this browser. Then the apex page got refreshed and the popup disappeared.

 

How to make the page not to refresh when the user switches the browser?

SFDC_EvolveSFDC_Evolve

@ eswari...... 

 

Could you please post the code snippet to get the clear picture of this...  

One more thing . . 

 

It is different Brower  or  different  tab.. . 

 

Thansk 

SFDC_Evolve

eswarieswari

The scenario is I logged into salesforce in chrome browser and opened a popup in one of my apex page. Then If I open a new tab in chrome or open new browser window and go back to the chrome tab where I have opened the popup, the apex page gets refreshed and the popup disappears.

 

In simple words, I opened a poup and then go away from the tab and come back the popup disappears.

 

bob_buzzardbob_buzzard

Hmm. Which type of popup is this?.  if it was a genuine popup (i.e. new window) I'd expect it just to be hidden behind the browser, if it was a pseudo popup handled via layers, then it might be that when you click on another area of the page to focus/hover, the layer gets hidden again.

Navatar_DbSupNavatar_DbSup

Hi,

 

Try the below code snippet as reference:

 

-------------- Apex Vf page 1-------------

<apex:page >

  <script>

  alert('hello');

  function openwindow()

  {

      alert('vvv');

      window.open('../apex/blockrerender','Ratting','width=800,height=520,toolbar=0,menubar=0,status=1,resizable=0');

      return false;

  }

  </script>

  <Apex:form >

  <apex:commandButton value="click me" onclick="return openwindow()"/>

  </Apex:form>

</apex:page>

 

 

 

 

-------------- Apex page 2------------------

 

 

<apex:page >

<script>

function closeme1()

{

alert('ppp');

window.parent.opener.location.reload(true);

window.parent.close();

}

</script>

<apex:form >

  <apex:commandButton value="close me and referesh" onclick="closeme1()"/>

 </apex:form>

 

</apex:page>

 

 Note: Save the 2nd page with blockrerender name

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.