How to get dynamic url into code and then open in iframe? Also, anyone got basic tutorial like w3c school?

Hello everyone. So i am now working on a project. I have put an iframe named #html1, to open dynamic page from #dynamicDataset. I am not good with code, only knew basic code on html and css so i am having trouble with this language. I want a button in page1 open to page 2 with different link in iframe in page2. If i connected page1 button to dynamic link into page2, the iframe still static (because i still havent figured it out what to write). My question is

  1. Where should i start to code? In page1 button, page2, or site?
  2. Any clue what to write? I know this code is still wrong. I write this code in page 2

import wixWindow from ‘wix-window’ ;
let item = $w( “#dynamicDataset” ).getCurrentItem()[ “link-all-asset-1-title” ];
let url = item ;
$w( “html1” ).src = url;

  1. Do you guys have tutorial step by step and how it works for code in wix? I am still having trouble reading corvid reference, unlike w3c school which is easier because they tested one by one. Also, i still havent find video tutorial for coding. Do you guys have any suggestion?

  2. let item = $w( " #dynamicDataset " ).getCurrentItem()[ “link-all-asset-1-title” ];
    Is the syntax is correct already? what i mean is, i want to create a syntax to access that link in the database.

Thanks a lot!

Hi,
If I understand correctly, you want to have 2 pages with different iFrames and a button linking from one page to another.
To do so you don’t need to use coding. You need to add html elements to each page. For each element set a different source link. You can learn how to do it here .
And on page1 you can add a link (to page2) for a button as shown here .

Corvid by Wix uses JavaScript as a language for coding, you can see the API reference and examples on the Corvid site. Also, you can find some helpful articles in the Wix Help Center here .

The code you wrote gets the current item from the dataset which is connected to a database collection. It basically returns all the fields and values of the current database row. Click here to learn more.
However, the code you wrote is incorrect, it should be:

let itemObj = $w("#myDataset").getCurrentItem();
let link = itemObj.linkfield;

Where linkfield should be replaced with the relevant field key from the database collection (e.g. link-all-assets-1-title).