I am making a social networking website where in i am adding the functionality of letting people being tagged in photos.For this i have to store the co-ordinates of the tag window and send them to
servlet so that i can store them in a databse.
However the code which i have ,stores the co-ordinates in javascript function.(Heres the javascript code):
Now how do i get the variables pos_x,pos_y,pos_width,pos_height and send them to a servlet.
Heres one approach which i applied:I created an object and stored the co-ordinates inthat object in the above javascript code like this:
However i do not know how to get the returned object (namely "coordinates")in my html calling code.Hers how i call the above javascript function:
<input type='button' value='Add Tag' onclick='return addTag()' />
Please suggest me an approach or help me correct my approach.