Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<s:select onchange="changeAmt()"> not working

 
Mamata Chaudhari
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..
I am using struts 2..
I want tabs on my jsp
and my code is..
On first Jsp i used to create tabs which works fine for me.


<s:tabbedPanel id="test" labelposition="middle" >
<s:iterator value="teamlist">
<s:url id="resultsUrl" action="navigateChangeTeamAction.action" >
<s:param name="teamCode" value="teamCode" />
<s:param name="teamName" value="teamName"></s:param>
</s:url>
<s:div label="Team2" theme="ajax" labelposition="center" href="%{resultsUrl}">
</s:div>
</s:iterator>
</s:tabbedPanel>

after executing navigateChangeTeamAction.action
now on my tabbed jsp code is as...



<s:select name="teamEmpNameCombo"
id="teamEmpNameCombo"
list="teamEmployeelist"
listValue="employeeName" headerKey="1" headerValue="Select" multiple="true"
cssStyle="width:130;font-size:15;"
onchange="select(this.form);" theme="simple" >
</s:select>




but onchage javascript function select() not called. not giving any error.
if i put alert("Hi"); instead of select() it gives me alert message.


Please help me?? I don't know why my javascript function is not getting call??
 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mamata I think you should provide the code for your javascript method here so that we can see it. Also try to debug the method either using any tool like firebug or putting alert messages inside the method (like as the first statement) to see if the method is getting called. Also I've never used this tag before so can you please check the source of the generated page to see if this tag renders frames in the generated page in the browser...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And please UseCodeTags.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic