tags:

views:

34

answers:

1

I want to know what value holds in this.id.

<input id='edit" + id + "' type='button' value='Edit' onclick=edit(this.id) />"

The button calls edit(). So, shall i write var newid = id; to get the ID value of edit button.

Thanks

+1  A: 

It gets you the value of the id attribute eg id='edit" + id + "'.

Sarfraz
You mean the id = "edit"+id.....
NooBDevelopeR
@MaRaVaN: Exactly :) So you are basically passing the id value to the edit function.
Sarfraz
Don mistake me, i am a noob in this. What arg i should pass to edit().Shall it look like edit(id){var newid = id;}
NooBDevelopeR
@MaRaVaN: Yes that's looks fine.
Sarfraz
@Sarfraz: It WORKS DUDE... Great MaN... I spent almost 1 hour in this. Thank you very much man. Thank you very much.
NooBDevelopeR
@MaRaVaN: Welcome :)
Sarfraz