Hi,
I have a submit button that goes to my javascript function.
I have a while i < 5 where i = 0 let var1 = i;
The submit button has a name=submit value=submit and an id attribute that gathers it values form the var1...so
id=var1. so in the end i have 6 submit buttons all with different id values. I am able to do this through my xml/xsl files. which is beside the point. but anyways, with each submit button i also have an onClick that goes to the javascript function.
What I would like to know is how do I only obtain the value of the id that the user has clicked? ie, user clicked second submit button and so my id = 1
what is the syntax for grabbing this id and showing it my my alert box?alert(id)...shows 1
Thanks,
Candy
PS. if this is a bad way of doing this, I'm up for some better suggestions
I have a submit button that goes to my javascript function.
I have a while i < 5 where i = 0 let var1 = i;
The submit button has a name=submit value=submit and an id attribute that gathers it values form the var1...so
id=var1. so in the end i have 6 submit buttons all with different id values. I am able to do this through my xml/xsl files. which is beside the point. but anyways, with each submit button i also have an onClick that goes to the javascript function.
What I would like to know is how do I only obtain the value of the id that the user has clicked? ie, user clicked second submit button and so my id = 1
what is the syntax for grabbing this id and showing it my my alert box?alert(id)...shows 1
Thanks,
Candy
PS. if this is a bad way of doing this, I'm up for some better suggestions