top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
![feature fixed.png](https://static.wixstatic.com/media/3bfa8a_f845e1016b8a49758acdd6edd6610c3b~mv2.png/v1/crop/x_0,y_2,w_852,h_508/fill/w_104,h_62,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/feature%20fixed.png)
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
yes
when click any button get other video from other page
how fixed
thank Ahmed for reply
my code don't work
I want to when click button 1 show video YouTube or button 2 show video Facebook
export function buttonServer1_click(event) { $w.onReady(()=> { $w('#dataset5').onReady(() => { let item =$w('#dataset5').getCurrentItem(); $w('#videoPlayerYoutube').src = item.urlYoutbe; }) }) } export function buttonServer2_click(event) { $w.onReady(()=> { $w('#dataset5').onReady(() => { let item= $w('#dataset5').getCurrentItem(); $w('#videoPlayerYoutube').src = item.urlFacebook; }) }) }
Hi Ahmed 🖐
You don't need to query to get the ID of the current item, you just need to to use the getCurrentItem() function, then extract the ID from it.
$w.onReady(()=> { ('#dataset1').onReady(() => { let item $w('#dataset1').getCurrentItem(); let itemId = item_id; // This is the item ID console.log(item._id) $w('#videoPlayerYoutube').src = item.urlYoutube; $w('#buttonServer1').onClick((event) => { $w('#videoPlayerYoutube').src = item.urlYoutube; }) $w('#buttonServer1').onClick((event) => { $w('#videoPlayerYoutube').src = item.urlFacebook; }) }) })
Hope you find this useful~!
Ahmad