David Paez7098939
Posts: 0
Joined: Thu Sep 11, 2014 7:26 pm

Specific Value Change on "Select Event"

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?

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

Specific Value Change on "Select Event"

Hello!

Unfortunately your issue is not clear.
Could you specify your problem with more details?

David Paez7098939
Posts: 0
Joined: Thu Sep 11, 2014 7:26 pm

Specific Value Change on "Select Event"

Image

In the Event, I want to specify the value that triggers the event instead of any value change. Does this make sense?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Specific Value Change on "Select Event"

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

David Paez7098939
Posts: 0
Joined: Thu Sep 11, 2014 7:26 pm

Specific Value Change on "Select Event"

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Specific Value Change on "Select Event"

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.

David Paez7098939
Posts: 0
Joined: Thu Sep 11, 2014 7:26 pm

Specific Value Change on "Select Event"

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.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Specific Value Change on "Select Event"

Hi David,

Unfortunatly it's not clear what you want to implement.

Please show us screen shots and describe them to be clear.

Regards.

David Paez7098939
Posts: 0
Joined: Thu Sep 11, 2014 7:26 pm

Specific Value Change on "Select Event"

Image

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Specific Value Change on "Select Event"

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.

Return to “Issues”