Page 1 of 2
Specific Value Change on "Select Event"
Posted: Thu Sep 11, 2014 7:26 pm
by David Paez7098939
I am trying to run the following JS "Appery("vimeo_4").attr("src", "https://player.vimeo.com/video/"+29842...");"
I can get it to trigger when I select something different, but I do not have an option to to trigger on a specific selection.
Am I missing something simple?
Specific Value Change on "Select Event"
Posted: Fri Sep 12, 2014 3:36 am
by obullei
Hello!
Unfortunately your issue is not clear.
Could you specify your problem with more details?
Specific Value Change on "Select Event"
Posted: Fri Sep 12, 2014 1:23 pm
by David Paez7098939
In the Event, I want to specify the value that triggers the event instead of any value change. Does this make sense?
Specific Value Change on "Select Event"
Posted: Fri Sep 12, 2014 1:42 pm
by Evgene Karachevtsev
Hello David,
The event will be triggered in any case, regardless of value but to perform some action or not you can do by checking the value of the selected option (it is available via $(this).val() ). For example
pre
if ($(this).val() == "someSpecValue") {
//do something
}/pre
Specific Value Change on "Select Event"
Posted: Tue Nov 04, 2014 5:09 pm
by David Paez7098939
Thank you so much for your reply.
I got to run
if ($(this).val() == "ep2") Appery("vimeo_4").attr("src", "https://player.vimeo.com/video/"+29844...");
but when I try to do the same for a button, the url variable of the button does not change.
if ($(this).val() == "ep2") Appery("mobilebutton_6").attr("URL", "https://player.vimeo.com/external/2984...");
Any ideas?
Specific Value Change on "Select Event"
Posted: Wed Nov 05, 2014 1:56 am
by Yurii Orishchuk
Hi David,
You get that cause of "this" is - action event element. So in button case - it will be button instead of select.
So you should modify your code to unlink this code to "this" and link directly to select component.
pre
//Where "selectName" is your goal select component name.
var selectValue = Apperyio("selectName").val();
if(selectValue == "ep2"){
Appery("vimeo_4").attr("src", "https://player.vimeo.com/video/"+29844...");
};
/pre
Regards.
Specific Value Change on "Select Event"
Posted: Wed Nov 05, 2014 2:37 pm
by David Paez7098939
I got this to run for my for vimeo component, but I want to change the url in my mobilebutton_6 when I my choice in the selection.
Specific Value Change on "Select Event"
Posted: Thu Nov 06, 2014 3:00 am
by Yurii Orishchuk
Hi David,
Unfortunatly it's not clear what you want to implement.
Please show us screen shots and describe them to be clear.
Regards.
Specific Value Change on "Select Event"
Posted: Mon Nov 17, 2014 3:44 pm
by David Paez7098939
As you can see theres a selector and download button, When I select something the list the video ID Changes, what I would like to do is to change the vale of the download link in the download button, does that make sense?
Specific Value Change on "Select Event"
Posted: Tue Nov 18, 2014 3:29 am
by Yurii Orishchuk
Hi David,
Yes that make a sens..
Please specify how do you implement this button. (implementation that does download function).
We will provide a solution after.
Regards.