I created dynamic web pages in Wix. I want a button so if I clicked the button, then the URL of the current page should be copied. So how to implement this?
Like this…
I created dynamic web pages in Wix. I want a button so if I clicked the button, then the URL of the current page should be copied. So how to implement this?
Like this…
You can use wix-location to retrieve the current URL: https://www.wix.com/code/reference/wix-location.html
then on button click, pass the url to an html component.
In the html component write code to copy to clipboard: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_copy_clipboard
பகலவன் ,
another useful built in function is wix-window. Here you can us wixLocation.url to get the current url. Then use wixWindow to copy that retrieved url with wixWindow. copyToClipboard( )
Code can be found here https://www.wix.com/corvid/reference/wix-window.html#copyToClipboard
Trying to create a “copy page url” function on button click.
I understand how to use wix location but how does the following work: " then on button click, pass the url to an html component." ?
I am a bit stuck so any help much appreciated?