110
Views
4
Comments
[Drag-n-drop Sortable List] Issue with Javascript/ variables
Question
drag-n-drop-sortable-list
Web icon
Forge asset by Renato Pauleta

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

2019-11-12 17-31-26
Justin James
 
MVP

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


2018-10-15 13-43-39
Joseph Palmer

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

2019-11-12 17-31-26
Justin James
 
MVP

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

2021-03-24 17-29-38
Frederico Sousa
Champion

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.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.