javascript - Issues with opening URL in new tab -


I'm trying to open a link in a new tab using JavaScript, however, I'm having some problems I link is a record in CRM and the error I get is:

  'Input String was not in the correct format.'  

Looks like my URL:

  https://companyname.com/crm/main.aspx?etc=112&extraqs=% 3f_gridType% 3d112% 26etc% 3d112% 26id% 3d% 257b240F22C7-A795-E311-83F6-00155D01A312% 257d% 26 Prishtmaod% 3diframe% 26preloadcache% 3d1392415527562% 26rskey% 3d228507345 & amp; PageType = Antitechord  

This works by opening links in the current tab:

  & lt; P & gt; & Lt; A href = "Https://kpanynmekcom/karm/mankaspsh?attk=ll2∓akstrks =% 3f_gridtype% 3dll2% 26etc% 3dll2% 26id% 3d% 257b240F22C7-A795-A3ll-83F6-00l55D0lA3l2% 257d% 26pagemode % 3diframe% 26preloadcache% 3d1392415527562% 26rskey% 3d228507345 & page type = entityrecord "& gt; Click this link! & Lt; / A & gt; & Lt; / P & gt;  

But it does not work:

   

^ This is the one that returns an 'Input String ...' error

I'm not sure what I'm doing wrong, so any input Is appreciated!

Thank you!

You can add a new target = "_ blank" Open the page in the tab. You are using window.open, which is for a pop-up, not a new tab.

  & lt; A href = "..." target = "_ blank" & gt; ... & lt; / A & gt;  

Comments