Answer the question
In order to leave comments, you need to log in
How to pass link onclick?
hello, please tell me how to pass a link
parameter {$details_url} contains a link to the current page, but in this case it is substituted as plain text - {$details_url} .
Tried like this {$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI} - doesn't work, also displays text
What can be done in this situation?
<script>
function OpenWindow(url, windowName) {
newwindow = window.open('https://site.ru/sharer?url=' + url, windowName, 'height=600,width=800');
if (window.focus) {
newwindow.focus();
}
return false;
}
</script>
<button onclick="OpenWindow('{$details_url}')">Click me</button>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question