0
votes
  • I am new to js,

    • I am getting an error at the line popup.location.href = "/desktop/main"; as Uncaught TypeError: Cannot read property 'location' of undefined,
    • how to fix the problem
    • providing my code below

              success: function () {
                  //   me.showNewWindowSuccess(menu, newWindowId);
                  me.registerMenuClick(menu, newWindowId);
                  popup.location.href = "";
              },
              scope: me
          });
      },
      
1

1 Answers

0
votes

You are not passing the url to the function openNewWindow

the if(url) returns false in the function, so it never returns anything.

thats the reason for popup to be undefined