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
Starz26Starz26 

Open New Window in remote action response

I tried the suggestion in this thread:

 

http://boards.developerforce.com/t5/Visualforce-Development/open-new-window-in-remoteAction-response/m-p/372345#M44231

 

and still no window opens up.

 

I have tried everything I can think of and it just will not open a new window.

 

Here is my current code:

 

function processAppt(scannedID, numGuests){
    Visualforce.remoting.Manager.invokeAction(
        '{!$RemoteAction.APPT_AppointmentCheckInController.createAppt}', 
        scannedID, numGuests, 
        function(result, event){
            if (event.status) {
                    window.open(/apex/badge_temp?id=' + result);
 
            } else if (event.type === 'exception') {

            } else {
                
            }

        }, 
        {escape: false}
    );

    rerenderMsgs();

}

 Anyone have anoy other ideas?

 

 

bob_buzzardbob_buzzard

It looks like you have a typo in your code, as the URL doesn't have an opening single quote:

 

window.open('/apex/badge_temp?id=' + result);

 if that was just a cut and paste error, I'd try a couple of things:

 

(1) Look for errors in the javascript console

(2) Add some alerts to check that the function is being correctly called when the action completes and that the event contains what you are expecting.