51
Views
1
Comments
Open url in new tab with serverside javescript window.open is not working
Application Type
Traditional Web

Hi,

I have submit action for click button as I am using events to get the data from parent and child blocks.

So intead of using navigate option I'm using Javascript in serverside.

WHen I use the logic 

"window.open('/abc/status.aspx?ProdID=3370724', '_blank')" it works as expected and opens the url in new tab. 

But if I pass the ProdID dynamically  with parameter, productId =3370724 

"window.open('/abc/status.aspx?ProdID='"+ productId +",'_blank')"  it fails. How to make this work.

Appreciate your inputs.


Regards,

Ramya

2024-05-08 06-29-37
Prince Aadil Khan Panwar

hi @Ramya somashekaraiah 

try with this 

var urlWithParams ='/abc/status.aspx'+ '?ProdID=' + productId ;     // Open the link in a new tab   window.open(urlWithParams, '_blank'); 

hope this will help you.

Regards,

Prince

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.