/    Sign up×
Community /Pin to ProfileBookmark

Java Web Application and JavaScript question onChange event?

Hey guys. I have a Java web application that I have been trying to sort this bug out. I’m not sure if any body is familiar with what is going on. Basically I have a drop down list that needs to be populated with mysql data. It is not working. It will populate if I change the drop down menu box once. If I do that then it populates. I have backtracked and backtracked the bug to where a certain method is called in my java source. It is then in turn called in my javascript Page1.jsp. Well the code is never called until the drop down menu is changed. I’m guessing because it uses an onChange event. So my question is I need this set of code to run when the page loads so my menu will populate right. What is the best way of doing that? If anybody has any tips or help that would be so great. Thanks This is some of the code right now.

[CODE]
<webuijsf:dropDown binding=”#{Page1.ddCustomers}” id=”ddCustomers” items=”#{SessionBean1.customersList}”
onChange=”webui.suntheme4_2.common.timeoutSubmitForm(this.form, ‘ddCustomers’);” valueChangeListenerExpression=”#{Page1.ddCustomers_processValueChange}”/>

<webuijsf:label id=”ddLocationsLabel” text=”Locations”/>
<webuijsf:dropDown binding=”#{Page1.ddLocations}” id=”ddLocations” items=”#{SessionBean1.locationsList}”
onChange=”webui.suntheme4_2.common.timeoutSubmitForm(this.form, ‘ddLocations’);” valueChangeListenerExpression=”#{Page1.ddLocations_processValueChange}”/>
[/CODE]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @archaikz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...