You are viewing limited content. For full access, please sign in.

Question

Question

onchange on collection

asked on July 13, 2018 Show version history

Hi all,

 

How can I make a "onchange" on the collection?

I tried this :

$("#Field31").change(function()
	{
    	alert("The text has been changed.");
    });
$("#Field31(1)").change(function()
	{
    	alert("The text has been changed.");
    });
$('[id^=Field31]').change(function()
	{
    	alert("The text has been changed.");
    });

But it doesn't work.

0 0

Answer

SELECTED ANSWER
replied on July 16, 2018

Hi Olivier Baccino 

Hope this is helpful. 

$(document).ready(function () {
  
  
   $('.collectionC').change(function(){
   
   alert("The text has been changed.");
   });

});

I gave the collection a class name, This way you don't have to create a change function for each field , Any change made inside the function will pop up the alert. As you can see with the screen shot below.

3 0
replied on July 16, 2018

Hi @████████,

Thanks ! This is exactly what I want.

Regards

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.