cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace standard button with image button

Former Member
0 Kudos

Hi,

I am working on CRM ISA B2B application. Now on the first page “login.jsp” as per standard B2B they have two buttons “Log on” and “Change Password.” These both buttons are inside <form> as below.

<form method="POST" action='<isa:webappsURL name="b2b/login.do"/>' name="login_form" onSubmit="return checkFields()">

A.1) <input type="image" src="<%= WebUtil.getMimeURL(pageContext, "b2b/mimes/images/submit_button.gif") %>" value="" name="<%=LoginAction.PN_LOGIN%>" align="absmiddle">

A) <%<input class="head" type="submit" value="<isa:translate key="b2b.login.jsp.login"/>" name="<%=LoginAction.PN_LOGIN%>">%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

B) <%<input class="head" type="submit" value="<isa:translate key="b2b.login.jsp.pwchange"/>" name="<%=LoginAction.PN_PASSWORD_CHANGE%>"></td>%>

B.1) <input type="image" src="<%= WebUtil.getMimeURL(pageContext, "b2b/mimes/images/reset_button.gif") %>" value="" name="<%=LoginAction.PN_PASSWORD_CHANGE%>" align="absmiddle">

</form>

Actually I want to use image button instead of standard Button. I have commented original code for buttons as A) and B) and I insert image respectively A.1) and B.1) for A) and B).

With original <input type=Button> code when I click on “Log on” and “Change Password” button it was working properly. But after replacing “Type=button” to “type=image” my “Log on” image button is working fine but when I click “change password” button It also calling to “Log on” button. I am not getting “Change Password” screen.

Any help how to resolve this problem? Would be highly appreciated. How I can call appropriate action on each image button.

Thanks.

Ashish Patel.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

try to use the OnClick="form.submit()" event in the image tag.

see this link

http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml

Kind Regards

Mukesh