Message when a Radio Button is selected
Hi all,
i need a script that popup a message when a radio button is selected.
my script does not work. Hmm, what is wrong.
fd.field('Absence_x0020_message').change(function(){
if(fd.field ('Absence_x0020_message').value().text() == "Deutsche Niederlassungen - E-Mails die nicht gelesen oder weitergeleitet werden"){
confirm('Please enter the E-Mail address from your info mailbox');
});
Can you help me?
Best wishes
Tom
i need a script that popup a message when a radio button is selected.
my script does not work. Hmm, what is wrong.
fd.field('Absence_x0020_message').change(function(){
if(fd.field ('Absence_x0020_message').value().text() == "Deutsche Niederlassungen - E-Mails die nicht gelesen oder weitergeleitet werden"){
confirm('Please enter the E-Mail address from your info mailbox');
});
Can you help me?
Best wishes
Tom
Hello Tom,
To get the text of the selected option you need to use this code:
So your code should look like this:
To get the text of the selected option you need to use this code:
Code: Select all
var index= fd.field('Choice').value();
fd.field('Choice').control()._el().find('td').eq(index).find('label').text();
Code: Select all
fd.field('Absence_x0020_message').change(function(){
var index = fd.field ('Absence_x0020_message').value();
if(fd.field ('Absence_x0020_message').control()._el().find('td').eq(index).find('label').text() == "Deutsche Niederlassungen - E-Mails die nicht gelesen oder weitergeleitet werden"){
confirm('Please enter the E-Mail address from your info mailbox');
});
Hi Mnikitina,
many thanks for the fast answer but the script does not work. It works only when I add Value ('0') in line two.
fd.field('Absence_x0020_message').change(function(){
var index = fd.field ('Absence_x0020_message').value('0');
//if(fd.field ('Absence_x0020_message').control()._el().find('td').eq(index).find('label').value(); == "Deutsche Niederlassungen - E-Mails die nicht gelesen oder weitergeleitet werden"){
confirm('Bitte geben sie im Feld "Contact" entweder die E-Mail Adresse oder den Namen der Niederlassung ein');
});
What is wrong?
Best wishes
Tom
many thanks for the fast answer but the script does not work. It works only when I add Value ('0') in line two.
fd.field('Absence_x0020_message').change(function(){
var index = fd.field ('Absence_x0020_message').value('0');
//if(fd.field ('Absence_x0020_message').control()._el().find('td').eq(index).find('label').value(); == "Deutsche Niederlassungen - E-Mails die nicht gelesen oder weitergeleitet werden"){
confirm('Bitte geben sie im Feld "Contact" entweder die E-Mail Adresse oder den Namen der Niederlassung ein');
});
What is wrong?
Best wishes
Tom
Hello Tom,
With this line, you are selecting the first option of the Radio Buttons field.
This is my typo, I'm sorry. There is an extra ; in the code.
Please try out this code:
With this line, you are selecting the first option of the Radio Buttons field.
This is my typo, I'm sorry. There is an extra ; in the code.
Please try out this code:
Code: Select all
fd.field('Absence_x0020_message').change(function(){
var index = fd.field ('Absence_x0020_message').value('0');
if(fd.field ('Absence_x0020_message').control()._el().find('td').eq(index).find('label').value() == "Deutsche Niederlassungen - E-Mails die nicht gelesen oder weitergeleitet werden"){
confirm('Bitte geben sie im Feld "Contact" entweder die E-Mail Adresse oder den Namen der Niederlassung ein');
}
});
-
- Information
-
Who is online
Users browsing this forum: No registered users and 11 guests