Hello.
Here is my problem (Go to my site to understand):
https://ledocsites.wixsite.com/website/genres/com%C3%A9die
When I click on my "Genre précédent" or "Genre suivant" buttons to go to the previous or next page, my wallpaper does not change. (It is linked to the genre database). I have to refresh my page manually to display the right background...
What code should I use so that when I click on the icon of the next or previous page, it automatically refreshes the page and displays the right background?
Thanks for your help
I have found a method of subtitution. I transformed my next and previous buttons into back buttons that return to the choice page of the genre...
It's my practice but too bad
Ok
Thanks for taking the time to look at it.
In the editor, it works... The background changes. But once online, it is always the same background that remains... It's too weird...
you forgot # for dynamicDataset
Give me your email, I'll share the rights of my site with you, if you want? it will be easier for you
I understand that every job deserves a paycheck.
And thanks for the help and time spent trying to make me understand all this.
But here, I still have the same problem... I don't have an address for my backgrounds since they are linked to the "genres" database... One genre=one background... The dynamic page, its data and the background are linked to this database...
My backgrounds are not random... They are specific to the dynamic page they are attached to...
If you go here for example :
https://ledocsites.wixsite.com/website/genres/animation
Click on the previous or next button... Wait for the page to load, and refresh it... You will see that the corresponding background will appear.
I have a "genre" database (ex : animation, comedy, drama...) Each genre has its specific background.
All I want is that these famous backgrounds appear without having to refresh manually each time.
If I come here, it's to be given a solution. I've wasted a lot of time here. My English is average and code is not my thing... Wix's explanation site may be clear for English initiates, but not for a French beginner like me...
I just wanted something quick and I would have studied the code afterwards to try to understand it...
Anyway, thanks for the help
It doesn't help me anymore...
thanks for the help though
I have no more errors in the code, but it doesn't work. It still doesn't change my backgrounds when I go to the next dynamic page... I always have to do an F5 to refresh my page and see the right background appear...
I must be stupid or blind, but I don't see where the mistake is
My english is limited :p I'm french ^^
Sorry, this one is MY FAULT 😁. (oooops, this mistake happened to me totaly by chance 😁😁😁😁😁😁)
But, now you should be able also to fix this last ERROR by your own.
Did you read this one ????
https://www.wix.com/velo/reference/wix-dataset/dataset/getcurrentitem
Please read it again!
$w.onReady(()=>{console.log("My page is ready!"); $w("#dynamicDataset").onItemReady(()=>{console.log("My Dataset is ready!"); $w("#vectorImage3").onClick(()=>{console.log("Previous-Button clicked!") }); $w("#vectorImage2").onClick(()=>{console.log("Previous-Button clicked!") }); }); });
On the ".onItemReady", i have this message : Property 'onItemReady' does not exist on type 'dynamicDataset'.
I have this error on line 2 : TypeError: $w(...).onItemReady is not a function
Do I replace the ' with " in your code ?
it doesn't work... I am not the king of code... :p
A dynamic page depends on a database. My wallpapers for these pages depend on this database. One background per page.
When it's a normal page, like my home page and the two following ones, the backgrounds are specific to these pages, without any link behind.
I will test the codes. Thanks for the answer.
No code, for the moment... It's just dynamic pages