Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

How to make a button of different behaviour?

Ads

 
 

Share on Google+Share on Google+

Paritosh Das
How to make a button of different behaviour?
0 Answer(s)      6 years and 3 months ago
Posted in : JSP-Servlet

Suppose In a jsp page I have a button SAVE with id="btnSave" value="SAVE" and a javascript function ajaxInsertUpdateData(arg,......) to call a servlet InsertUpdate.java. Onclick event of SAVE button will call ajaxInsertUpdateData(document.getElementByID("btnSave").value,......);

Now I want the SAVE button to be changed to UPDATE button id="btnSave1" value="UPDATE" and onclick event of UPDATE button will call ajaxInsertUpdateData(document.getElementByID("btnSave1").value,......); How to do this?

Ads
View Answers
Ads