$dash = www.dashboard.com

$name = My Test Panel

<input type="button" class="button" value="button" onclick="window.open('$dash + $Name')"/>

<script>onclick="window.open(this.href,'popUpWindow','height=400,width=600,left=10,top=10,,scrollbars=yes,menubar=no'); return false;"</script>

When I click the button I want the following URL to open

www.dashboard.com/My%20Test%20Panel

My above code is no good :(

2 Answers

0
Jack Bashford On

Just concatenate the strings together:

<input type="button" class="button" value="button" onclick="window.open(`${$dash}${$name}`)"/>
1
Nguyễn Hùng Hậu On

You mistook with letter '
You can use this

<input type="button" class="button" value="button" onclick="window.open($dash + $name)"/>