How to make a button of different behaviour?

How to make a button of different behaviour?

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?

View Answers









Related Tutorials/Questions & Answers:
How to make a button of different behaviour?
How create an overlay button on different containing div
Advertisements
How to make animated web button, make animated web button, animated web button
how to make a button left justification which is at right end
How to close a frame on action event of a button from a different class ?
how to make previous and next Button Display Data in php
how to make seperate view count for each row while clicking view button
how make ID - Ajax
How to make elements invisible ?
how to make this pattern???
how to make exampage in jsp ?
Maven dependency for com.mytechia - robobo-behaviours version 1.0.1 is released. Learn to use robobo-behaviours version 1.0.1 in Maven based Java projects
how to make multiple rectangles
how to make a program on array
Version of com.mytechia>robobo-behaviours dependency
How to make selectOneMenu scrollable
how to use button in array
How to get Button Id ?
How to display button as a link in vaadin?
how make excel
how to make paging with function ?
how to make a field left justification
how to make a label left alignment?
How to make first JSP page?
How to draw a web button, draw a web button, web button
How to make a chain, make a chain, chain
How to make directory in java
how to make paging with class and ajax
How to make bubbles, make bubbles, bubbles
How to make a transparent text
How to make phone call from web application
How to make the single click as double click in java
How to print different Messge for the same NumberFormatException on different cause objects in JAVA?
How to make halo effect
How to make a bone, make a bone, a bone
How to make a new List in Java
how to make multiple choice questions
How to make first JSP page?
How to Make iPhone Window Application
How to Explain different way of using thread?
How to make query and abstraction in Java
how to set size of button,textfield.
Maven Dependency robobo-behaviours >> 0.1
Maven Dependency robobo-behaviours >> 0.1.1
Maven Dependency robobo-behaviours >> 0.3.0
iphone button example
How to Explain different way of using thread?
How to Create Button With TableView in iphone
How To Make This Program - Java Beginners
how to disable browser back button

Ads