Widget Help

I am needing to add different versions of the code below to my database which will work with my dynamic item pages. Wix doesn’t allow to connect to html elements so is there a workaround for this?

JavaScript is currently disabled in this browser. Reactivate it to view this content.

Thank you! I am about to pull all of my hair out trying to figure this out and can’t seems to get any help from Wix. I have built my site which has taken forever but am just now realizing the most important feature doesn’t work.

Hi Kristen,

Using Wix Code it is possible to interact with an html element by passing parameters from the page.
Check out the following article

Thank you for your help! How would I use this to call a cell on the database?

Hi,

If you’re using a dataset (for example the dynamic page dataset), you can get the current item with getCurrentItem.
http://www.wix.com/code/reference/wix-dataset.html#getCurrentItem

Otherwise, you can query the collection with wixData.query
http://www.wix.com/code/reference/wix-data.html#query

Once you get the parameters from the collection, call postMessage with the relevant parameters to interact with the iframe code. Note that the iframe code should support this functionality.
http://www.wix.com/code/reference/$w.HtmlComponent.html#postMessage

Thank you for your help!

This is SO over my head.