Copy link to clipboard
Copied
Hi all:),
I'm trying to change the position of objectX to a certain coordinate after the user is using a ComboBox value. To do this I'm using the following code. The ComboBox is basically a dropdown with values from 1-10. Ive tried both if (value == 2) and if (value == "2"), but this just does not seem to work. Anyone knows how to do this?
Thanks very much in advance!
The code:
var _this = this;
$('#dom_overlay_container').on('change', '#Touchpoint1_Dropdown', function() {
var value = $('#Touchpoint1_Dropdown').val();
if (value == 2) {
this.objectX.x = 200;
this.objectX.y = 100;
}
}.bind(_this));
Apparently I used the wrong command to get the value of the ComboBox. Right now I succeeded by using
$('#dom_overlay_container').on('change', '#Touchpoint1_Dropdown', function () {
if (Touchpoint1_Dropdown.selectedIndex == 0) {
this.objectX.x = 200;
this.objectX.y = 700;
}
Copy link to clipboard
Copied
Apparently I used the wrong command to get the value of the ComboBox. Right now I succeeded by using
$('#dom_overlay_container').on('change', '#Touchpoint1_Dropdown', function () {
if (Touchpoint1_Dropdown.selectedIndex == 0) {
this.objectX.x = 200;
this.objectX.y = 700;
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now