[Drag-n-drop Sortable List] Issue with Javascript/ variables

[Drag-n-drop Sortable List] Issue with Javascript/ variables

  
Forge Component
(21)
Published on 23 Oct by Armando Gomes
21 votes
Published on 23 Oct by Armando Gomes

Hello

I have connected up this component, however am having an issue with the javascript.

The dragging element of it is working, however after the script is run, the "OnNotifyVarChange" action in the web block is run, which pulls through the message from the "notify" local variable.

Unfortunately the notify variable seems only to hold "nid=", and nothing else, meaning the update action wont work properly.

Hopefully someone can guide me on this!

Thanks

Look at the sample, are you properly setting extended properties on the items? So it has a property called "nid" and a value that lets you identify what was being dragged/dropped? Look at the properties in the container in the sample (below) to see what I mean.

J.Ja


Hi Justin.

I have defined the "nid" in the extended properties as you reference here, as "item_" + the id of the list item.

This does not seem to get picked up however?

Joe

Hmmm, that's not right. Sounds like it may be a JavaScript problem, or something that has changed in recent versions. Is there a place where this is public and could take a look at it in action?

J.Ja

Hello Joseph,

What J.James said is totally correct, in order for us to be able to help you further please attach an example module where you don't see this working.