Render on same page when url changes

Below is my code for dropdown menu …
This dropdown menu is on navigation side.
So i want to render on this url → /iotdevice-Management after select any value from dropdown.
I am attaching on screenshot for review…

‘change #selectroomlist’: function(e) {
e.preventDefault();
roomDevcollection = ;
var selectedrooms = $(“#selectroomlist”).val();
console.log(selectedrooms,“selected rooms”);
Session.set(“selectedrooms”,selectedrooms);
var roomDevice = DeviceSchema.find({ roomId: Session.get(‘selectedrooms’) }).fetch();
for(var iter = 0; iter < roomDevice.length; iter++){
roomDevcollection.push(roomDevice[iter].deviceName);
}
Session.set(‘roomDevcollection’,roomDevcollection);
console.log(roomDevcollection,“total added device”);
console.log(Template[“Iotdevicemanagement”],“asdasdasdasdasda”);
var userID = Meteor.userId();
Router.go(‘Iotdevicemanagement’,{_id: selectedrooms});
}

as you can see there is one dropdown at top left corner , so i want to render on same url when we select value from dropdon .
Because coding for circuit diagram in the image executes on render.
Plz help me out Thanks.

What you want is to redo your image (btw, why is it an image?) if the variable changes. That means using a Tracker.autorun (or this.autorun when in the onRendered hook) to redo the image.

Doing so this way will make sure you recreate the image everytime a reactive source changes, which is the meteor’s most wonderful magic.

Thanks for your rply @Salketer but i tried it another way and it worked . :wink:

Glad you got it working. It’d be cool to know how you did so it can help someone else later maybe.

@Salketer sorry for late rply i didnt see ur rply

i have used this

Building a User Interface with Transparent Reactive Programming

i was just looking for the solution then i saw this Transparent Reactive Programming…i wasn’t sure about that but when i tried it worked . :smile: