Results 1 to 2 of 2

Thread: spring form:input javascript onchange not working

  1. #1

    Default spring form:input javascript onchange not working

    All,
    Code:
    %@ page language="java" contentType="text/html; charset=ISO-8859-1"
    	pageEncoding="ISO-8859-1"%>
    <%@ include file="/WEB-INF/jsp/includes.jsp"%>
    <%@ include file="/WEB-INF/jsp/header.jsp"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <title>Edit Provider Number Transfer</title>
    <script type="text/javascript">
    function test(){
    alert("test");
    }
    </script>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Edit Provider Number Transfer</title>
    </head>
    
    <h2>Edit Provider Number Transfer</h2>
    <body>
    <form:form commandName="providerNumberTransfer"
    	action="${pageContext.request.contextPath}/providerNumberTransfers/update.html">
    
    	<table>
    		<tr>
    			<td>FromProvider Id:</td>
    			<td><form:input path="provider.providerId" readonly="true"
    				cssClass="readonly" />
    		</tr>
    		<c:choose>
    			<c:when test="${flag eq true}">
    				<tr>
    					<td>To Provider Id:</td>
    					<td><form:input path="toProviderId"
    						onchange="javascript:test()" />
    				</tr>
    in the above code onchange event is not working in IE8. Any idea? Thanks

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    the code work in other IE version? or even in other Web Browser?

    work if your try without javascript:?. I mean only onchange="test()"
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •