Avatar of viola123

asked on 

what is wrong in my Window.open script?

Hi all,
i try to open a window by clicking hyperlink. but i got Syntax error.
can anyone tell me what is wrong in my script?
var link = "Notes"
//syntax error for this one
var commentUrl = "<a href='javascript: void(0)' onclick='window.open('list.aspx', 'mywindow');return false;' >" + link + "</a>";

but if i use the following, everything works:
var commentUrl = "<a href='list.aspx'>" + link + "</a>";

Open in new window


Avatar of undefined
Last Comment

8/22/2022 - Mon