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
deckbladdeckblad 

Odd page popup on redirection

I've a user profile page with a form to update the user information.  The updateUser()  action called returns:

 

 

return new PageReference('/Profile?showStatus=true');

 

 

When the updateUser() action is ran, an intermediary redirection page is displayed.  For some reason, it's including a window.open() javascript command.  I can't find what's initiating that call at all.   Here's the HTML on that page:

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">


    <script language="JavaScript1.2">
        window.open("/apex/trainingCenterFourStar",
            "",
            "", false);
    </script>




<script>
if (window.location.replace){ 
window.location.replace('/Profile?showStatus=true');
} else {;
window.location.href ='/Profile?showStatus=true';
} 
</script>

</head>


</html>

 That first chunk of javascript shouldn't be there.  We're making no reference to trainingCenterFourStar at any point in the controller for the page  nor is it anywhere in the VisualForce page in question.

 

Might anyone know what's causing that to happen?  

Best Answer chosen by Admin (Salesforce Developers) 
deckbladdeckblad

I've found the issue.  We're defining a variable in our VisualForce footer container that just happens to be called "url"  this variable is used by the form action response/redirect.  Apparently, if it sees "url" as a set variable, it'll include a popup javascript function as formatted in my first post.  We got around the problem by simply changing our variable to "moreurl"

All Answers

deckbladdeckblad

I should say, there's not one instance of "window.open" in any of the Visual Force or Apex pages for this project.

deckbladdeckblad

This just in.  It happens on all forms.  Hitting the sort headers on a report page also causes the same intermediate popup page.

deckbladdeckblad

I've found the issue.  We're defining a variable in our VisualForce footer container that just happens to be called "url"  this variable is used by the form action response/redirect.  Apparently, if it sees "url" as a set variable, it'll include a popup javascript function as formatted in my first post.  We got around the problem by simply changing our variable to "moreurl"

This was selected as the best answer