Thanks for your suggestion. Now, I reduce my code as the following. But it
still does not work under Opera.
Maybe I have to use my own javascript instead of jquery, or I will try to
fix this problem of jquery.

===================================
<html>
<head>
<title>Insert title here</title>
<script type="text/javascript" src="/test/jquery-1.2.6.js"></script>
 <script type="text/javascript">
  function refreshProgress(){
    $("#test1").val("e");
    setTimeout(refreshProgress, 1500);
  }
   $(function(){
    $("#formtest").submit(function(){
     setTimeout(refreshProgress, 1500);
    });
   });
 </script>
</head>
<body>
 <form id="formtest" action="s.jsp" >
  <input id="test1" type="text" name="fname" value="Default" />
  <input type="submit" id="submitButton" value="submit"/>
 </form>
</body>
</html>
===================================

On Wed, May 28, 2008 at 7:47 PM, Ariel Flesler <[EMAIL PROTECTED]> wrote:

>
> Reducing that to the real situation... you're setting a number as
> value to a text field.
> That did cause troubles (for selects) but was fixed on 1.2.6.
> I tried this (setting the val to a text field) and worked well.
>
> Maybe something else is failing ? try to remove all the irrelevant
> code and generate a minimalistic test case.
>
> Cheers
>
> --
> Ariel Flesler
> http://flesler.blogspot.com
>
> On 28 mayo, 17:25, "arden liu" <[EMAIL PROTECTED]> wrote:
> > Hi,
> > Today, I did some tests of compatibility among IE 7.0.5730.11, Firefox
> > 2.0.0.14, Opera 9.27, Safari 3.1.1
> > The following JSP(includes Javascrpt) works fine under all these browser.
> > Then I used JQuery to implement the same function, it works fine under
> > IE/FF/Safari
> > The submit function does not work correctly under Opera.
> >
> > Maybe I did not use Jquery correctly, or it is a compatibility problem of
> > jquery-1.2.6.
> > Thanks.
> > Arden
> >
> ===============Javascript==================================================­=======
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <%@ page language="java" contentType="text/html; charset=UTF-8"
> > pageEncoding="UTF-8"%>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > <html xmlns="http://www.w3.org/1999/xhtml";>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> > <title>Insert title here</title>
> >  <script type="text/javascript">
> >   var ipVal=0;
> >   function refreshProgress(){
> >     ipVal = ipVal + 1;
> >     document.getElementById('test1').value=ipVal;
> >     setTimeout("refreshProgress()", 1500);
> >   }
> >  </script>
> > </head>
> > <body>
> >  <button id="buttonTest" onclick="setTimeout('refreshProgress()',
> > 1500);">Click Me!</button>
> >  <form id="formtest" action="s.jsp"
> > onsubmit="setTimeout('refreshProgress()', 1500);">
> >   <input id="test1" type="text" name="fname" value="Default" />
> >   <input type="submit" id="submitButton" value="submit"/>
> >  </form>
> > </body>
> > </html>
> >
> >
> =========================JQuery============================================­===
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <%@ page language="java" contentType="text/html; charset=UTF-8"
> > pageEncoding="UTF-8"%>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > <html xmlns="http://www.w3.org/1999/xhtml";>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> > <title>Insert title here</title>
> > <script type="text/javascript" src="<c:url
> > value='/javascripts/jquery/jquery-1.2.6.js'/>"></script>
> >  <script type="text/javascript">
> >   var ipVal=0;
> >   function refreshProgress(){
> >     ipVal = ipVal + 1;
> >     $("#test1").val(ipVal);
> >     setTimeout(refreshProgress, 1500);
> >   }
> >    $(function(){
> >     $("#buttonTest").click(function(){
> >      setTimeout(refreshProgress, 1500);
> >     });
> >     $("#formtest").submit(function(){
> >      setTimeout(refreshProgress, 1500);
> >     });
> >    });
> >  </script>
> > </head>
> > <body>
> >  <button id="buttonTest">Click Me!</button>
> >  <form id="formtest" action="s.jsp" >
> >   <input id="test1" type="text" name="fname" value="Default" />
> >   <input type="submit" id="submitButton" value="submit"/>
> >  </form>
> > </body>
> > </html>
> >
> =========================s.jsp=============================================­==
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <%@ page language="java" contentType="text/html; charset=UTF-8"
> > pageEncoding="UTF-8"%>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > <html xmlns="http://www.w3.org/1999/xhtml";>
> > <head>
> > <%
> > Thread.sleep(10000);
> > %>
> > </head>
> > <body>
> >  <button id="buttonTest">Click Me!</button>
> > </body>
> > </html>
>

Reply via email to