Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Alert Message onClick Client Script

salvadormar
Kilo Guru

good morning All,

I need some help on how to make an alert message when the user tried to click on a read-only textbox.

In the Client Script, I don't see onClick option. (note: this is follow up to this forum link correspondences: Textbox and Icon of glide date time Fields)

Thank you again!

Dor

1 ACCEPTED SOLUTION

twofirstnames
Kilo Expert

Hi Dor

Try the following:



function onLoad() {

$('change_request.start_date').observe('click', respondToClick);
$('change_request.end_date').observe('click', respondToClick);
$('change_request.work_start').observe('click', respondToClick);
$('change_request.work_end').observe('click', respondToClick);

function respondToClick(event) {
alert('Please use corresponding calendar icon when choosing dates.');
}

}


Cheers
Dale


View solution in original post

8 REPLIES 8

hi,



did you get a solution for this ?


twofirstnames
Kilo Expert

Hi Dor

Try the following:



function onLoad() {

$('change_request.start_date').observe('click', respondToClick);
$('change_request.end_date').observe('click', respondToClick);
$('change_request.work_start').observe('click', respondToClick);
$('change_request.work_end').observe('click', respondToClick);

function respondToClick(event) {
alert('Please use corresponding calendar icon when choosing dates.');
}

}


Cheers
Dale


Thank you again!!!! [another pointer for me to keep...]


Is there a similar function when clicking on a reference field ? Thanks