File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes <s:select onchange= not working" title="" /> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<s:select onchange="changeAmt()"> not working" Watch "<s:select onchange="changeAmt()"> not working" New topic
Author

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

Mamata Chaudhari
Greenhorn

Joined: Apr 26, 2009
Posts: 23
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

Joined: Aug 03, 2008
Posts: 9302
    
  17

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...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And please UseCodeTags.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <s:select onchange="changeAmt()"> not working