top of page

Forum Posts

mdsagaria
Jul 16, 2022
In Site & Page Design
Is there a way to make wix website works in offline. If internet connectivity goes down the site should be able to acces. It would be a great help if someone do that features working.
1
1
67
mdsagaria
Jul 10, 2021
In Coding with Velo
I have a dynamic page. first page contains title. Clicking on the title redirects to page details where different fields can be connected to dataset. I want to add two button in this page. When I click on button1 it should show field1 value in textbox1. When I click on button2 it should show field2 in the same textbix1. Kindly help someone with code. I'm completely new to Wix. No idea about Wix code. Thank you
0
1
34
mdsagaria
Aug 27, 2019
In Coding with Velo
This is the full code I used in my button but don't know where it goes wrong kindly help someone let fullText; // variable to hold the full text let shortText; // variable to hold the short version of the text $w.onReady(function () { const shortTextLength = 40; $w("#dynamicDataset").onReady(function () { fullText = $w('#dynamicDataset').getCurrentItem().textField; { $w('#myTextElement').collapse(); $w('#myButton').collapse(); } else { if (fullText.length <= shortTextLength) { $w('#myTextElement').text = fullText; $w('#myButton').collapse(); } else { // create the shortened version of the text and display it in the text element shortText = fullText.substr(0, shortTextLength) + "..."; $w('#myTextElement').text = shortText; } } }); }); export function myButton_click(event) { // display the full text $w("#myTextElement").text = fullText; // collapse the button $w("#myButton").collapse(); // check the contents of the text element if ($w("#myTextElement").text === shortText) { // if currently displaying short text, display the full text $w("#myTextElement").text = fullText; $w("#myButton").label = "Show less"; } else { // if currently displaying full text, display the short text $w("#myTextElement").text = shortText; $w("#myButton").label = "Show more"; } }
0
3
45

mdsagaria

More actions
bottom of page