wood burning stoves 2.0*
The moose likes Struts and the fly likes Java scriptlet strange problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Java scriptlet strange problem" Watch "Java scriptlet strange problem" New topic
Author

Java scriptlet strange problem

Vis Deo
Ranch Hand

Joined: Jul 02, 2004
Posts: 40
Does anyone know reason for not executing javascriptlet in javascript function? I am using struts 1.0
This code executes fine ---> value="<%=rprCode%>"

But InsertContent('<%=itrCount%>'); results in InsertContent('%=itrCount%');

itrCount has valid value and I am able to read it by assigning to hidden field as
<html:hidden name="formBean" property="rowKey" value="itrCount" />

Any thoughts?



In my code I have following javascriptlet

<td>
<html:select
name="formBean" property="rTypeArray" value="<%=rprCode%>" onchange="InsertContent('<%=itrCount%>');">
<htmlptions collection="REPAIRTYPES" property="key"
labelProperty="value" />
</html:select>

</td>


That results into

<td>

<select name="rTypeArray" onchange="InsertContent('%=itrCount%');">
<option value="1" selected="selected">N/A</option>
<option value="2">Pre-Repair</option>
<option value="3">Post-Repair</option>
</select>
</td>


Thanks,
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

your question is not clear . what error you get ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java scriptlet strange problem
 
Similar Threads
populate one drop down on change of other using ajax and servlet with jsp page
Using JSTL Data Displayed In Browser Is Getting Fixed To 24576 Bytes(24 KB)
html:select indexed - idexes the formbean i.s.o. the property
Format Date in Javascript
JavaScript not loading