I have 4 choices in dropdown select box, when I select each choice I should get popup for every choice , the popup should different for each choice. How can i get alert when change the choice.

Mad3
Tera Expert

Can help on,

Should get popup message when change select box choice in dropdown, each choice is have different popup should be populate in popup message.

1 ACCEPTED SOLUTION

okay then try this script

remember to put the correct choice value but not choice label while comparing in if loop like below

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
      return;
   }

if(newValue=="your_first_choice_value")
{
  alert('your alert message');
}   
else if(newValue=="your_second_choice_value")
{
  alert('your alert message');
}
else if(newValue=="your_third_choice_value")
{
  alert('your alert message');
}
else if(newValue=="your_fourth _choice_value")
{
  alert('your alert message');
}
}

MARK MY ANSWER CORRECT IF IT HELPS YOU

View solution in original post

7 REPLIES 7

Mohith Devatte
Tera Sage
Tera Sage

HELLO yo can write an in change client script for this on your select box field like below

change the variable to your select box in variable name field and place your script like below

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
      return;
   }

  alert('You have selected'+newValue);
   
}

newValue --> this is nothing but your changed value .It always stores the value when ever the field value is changed 

 

find_real_file.png

 

please mark my answer correct if it helped you

Hi Mohit, 

Thanks for reply!

I have 4 choices in dropdown, each dropdown choices should have one popup.

When select 1st choice should get popup,

When change the 2nd choice should get different popup, like wise i should have 4 popups for choices.

the above one is works for ony one choice.

Can you give an idea.

okay so i think every time you change the value it will throw a pop up so is that what you want ?

the above code should work every time you change the value 

or you have a predefined text for every choice selection where only that particular text should be displayed in alert ?

Yes, When I select choices I should get respective popup message for each choices as I have different popups messages for each select choice.