can i write a javascript function that recieves input from the jsp page and use taht data to fetch in the database? i want the result of that fetching to be available on the same JSP page itself.
I think you are saying how to submit the page data without hole page being submitted. AJAX can be used for this. Search about AJAX, You will find lots of information about this.
i actually want to develop a site, where the users can register their details. once the user name is given and click ina button named "Check Availability", the function should fetch the database to find whether the username is already present there. can i use simple javascripth there? or i have to go for AJAX?