Revision: 394
Author:   tfenne
Date:     2006-08-28 17:30:20 -0700 (Mon, 28 Aug 2006)
ViewCVS:  http://svn.sourceforge.net/stripes/?rev=394&view=rev

Log Message:
-----------
Fix for STS-250: form auto-focus causes JS errors with select fields.

Modified Paths:
--------------
    trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java
Modified: trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java  
2006-08-27 21:22:12 UTC (rev 393)
+++ trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java  
2006-08-29 00:30:20 UTC (rev 394)
@@ -381,7 +381,7 @@
             JspWriter out = getPageContext().getOut();
             out.write("<script type=\"text/javascript\">var 
z=document.getElementById('");
             out.write(getId());
-            out.write("'); z.focus(); z.select();</script>");
+            out.write("'); try{z.focus(); z.select();} catch(e) {}</script>");
         }
         catch (IOException ioe) {
             throw new StripesJspException("Could not write javascript focus 
code to jsp writer.", ioe);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to