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

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

Thank you!

Reddy39
Tera Expert

I have a alert box with link for dropdown values how to do this please help me