In your Client Side JavaScript, use the following function:
dojo.byId("#{id:FieldID}").value
Where Field ID is the ID property of your XSP object. This will calculate out the full rendered ID of the element and return its value to use in your client script.