html:submit with onclick javascript function
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Henri_Lambert
Posted On:   Monday, June 2, 2003 06:04 AM

Hello all, I have a problem with a submit button. Struts version 1.1-rc1. Let's say i want to call a javascript function when the submit button is clicked. For simplicity I call alert()... This don't work while this works Giving a parameter with the javascript function fails to compile with the following error: Config.jsp java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:582) at com.sssw.shr.jspc.IrBase.unQuoteValue(IrBase.java:263) at com.sssw.shr.jspc.IrCustomTag.makeTagDataFromAtt   More>>

Hello all,

I have a problem with a submit button. Struts version 1.1-rc1.


Let's say i want to call a javascript function when the submit button is clicked. For simplicity I call alert()...


This don't work

			







while this works
			






Giving a parameter with the javascript function fails to compile with the following error:

			
Config.jsp
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:582)
at com.sssw.shr.jspc.IrBase.unQuoteValue(IrBase.java:263)
at com.sssw.shr.jspc.IrCustomTag.makeTagDataFromAttributes(IrCustomTag.java:275)
at com.sssw.shr.jspc.IrCustomTag.validate(IrCustomTag.java:232)
at com.sssw.shr.jspc.IrCustomTag.generateCode(IrCustomTag.java:125)
at com.sssw.shr.jspc.IrBase.generate(IrBase.java:105)
at com.sssw.shr.jspc.IrBase.genChildNodes(IrBase.java:361)
at com.sssw.shr.jspc.IrCustomTag.generateCode(IrCustomTag.java:143)
at com.sssw.shr.jspc.IrBase.generate(IrBase.java:105)
at com.sssw.shr.jspc.IrBase.genChildNodes(IrBase.java:361)
at com.sssw.shr.jspc.IrCustomTag.generateCode(IrCustomTag.java:143)
at com.sssw.shr.jspc.IrBase.generate(IrBase.java:105)
at com.sssw.shr.jspc.IrBase.genChildNodes(IrBase.java:361)
at com.sssw.shr.jspc.IrSourceFile.genFileBody(IrSourceFile.java:133)
at com.sssw.shr.jspc.JspCompUnit.genFileBody(JspCompUnit.java:251)
at com.sssw.shr.jspc.JspCompUnit.generate(JspCompUnit.java:172)
at com.sssw.shr.jspc.JspCompiler.compileFile(JspCompiler.java:476)
at com.sssw.des.impl.deploy.WARDeplHelper.compileJSP(WARDeplHelper.java:1588)
at com.sssw.des.impl.deploy.WARDeplHelper.compileJsps(WARDeplHelper.java:1416)
at com.sssw.des.impl.deploy.WARDeplHelper.compileJspResources(WARDeplHelper.java:1288)
at com.sssw.des.impl.deploy.PvWARDeployer.deploy(AgWARDeployer.java:385)
at com.sssw.des.impl.deploy.PvWARDeployer.go(AgWARDeployer.java:318)
at com.sssw.des.cmd.AgoCommandLineProcessor.processCommand(AgoCommandLineProcessor.java:333)
at com.sssw.des.cmd.AgoCommandLineProcessor.go(AgoCommandLineProcessor.java:176)
at cCompilation successful: false
Error count: 1
Warning count: 0
Catastrophic error: /Config.jsp: An unexpected fatal exception 'Som.sssw.des.cmd.AgoCommandLineProcessor.main(AgoCommandLineProcessor.java:72)tring index out of range: 0' occured.

Compilation successful: false
Error count: 1
Warning count: 0
Catastrophic error: /Config.jsp: An unexpected fatal exception 'String index out of range: 0' occured.

Done.
A compilation error occured during the deployment of the archive, so the deployment was aborted.
This may have been caused by attempted compilation of incomplete JSP fra
at com.sssw.des.cmd.AgoCommandLineProcessor.main(AgoCommandLineProcessor.java:48)
gments.

To ignore compilation errors, re-run the command with the '-i' switch.
   <<Less

Re: html:submit with onclick javascript function

Posted By:   Christopher_Koenigsberg  
Posted On:   Monday, June 2, 2003 07:18 AM

What is this "com.sssw" jsp processor you are using?

About | Sitemap | Contact