Trying to display a new page, in a new window when the user clicks on a button.
Trying to test it out with this but no luck so far:
Label1.Text = "<form><input type=button name=print value='Print View' onClick='javascript:window.open('http://mylink','mywindow')'></form>";
I think it might be a formatting issue, but just can’t see it.
For example this works just fine:
<input type=button name=close value='Close' onClick='javascript:parent.jQuery.fancybox.close()'>
You should probably use:
If you want to include a variable, you can use:
However, make sure the contents of
urlis safe if it came from any user-provided input! Otherwise, you may be opening up yourself to script injection attacks.