PDA

View Full Version : AnyLink open new window



alex
01-19-2005, 05:22 PM
I would like to open a new browser window when my users click on a menu item. It doesn't seem like I can include an onclick method in the <a> tag because this doesn't work:

menu_10[11] = "<a href='#' onclick='alert('click')' >Page 1</a><br /> ";

Is there a solution to this problem? I only need it to work in IE.

Thanks, Alex

FPit
01-19-2005, 06:08 PM
this part:

onclick='alert('click')'

does not work because of your use of single quotes. Place alert text into variable and display it without quotes. Theoretically, even this will work:
onclick=alert('click')

Minos
01-20-2005, 05:13 AM
or...
menu_10[11] = "<a href='#' onclick='alert(\'click\')' >Page 1</a><br /> ";