Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto select of Select box and Submit

Status
Not open for further replies.

aHash

Programmer
Aug 22, 2000
78
0
0
US
I have a select box. I am auto selecting if my dynamically poulated items count is 2 (first item is space and second is a legit value)

here is my code.
Code:
                            if (params.getReportCategory()!=null && params.getReportCategory().getCategoryID().equals(cat.getCategoryID())) {
                                selected = "selected";
                            } %>
                            <option value="<%=cat.getCategoryID()%>" <%=(allCategories.values().size()==2)?"selected":""%> ><%=StringUtils.escapeHTML(cat.getCategoryName())%></option><%

But once the selection is done my onchange() event does not fire. How I can make and autoselection to fire the onchange to fire?? I tried onselect but no luck.

 
That's more a JavaScript question. I'd post the html code in the Javascript forum.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top