Page 1 of 1
initiate method when selecting value
Posted: Tue May 15, 2007 9:14 pm
by pleigh
hi, i have a method for dateweek() and would like to initiate that method everytime that i select a different value in the <select>. how can i accomplish this through onchange or onclick event of the <select> and <option>. thank you very much
Posted: Tue May 15, 2007 9:21 pm
by volka
php runs server side. onchange and onclick are client side events, i.e. they are handled by the client/browser. Each time the client sends a http request the server invokes a new instance of php that executes the given script. Each time onchange or onclick is trigged let the client perform a new http request.
Can be as simple as submitting the form, e.g. onchange="this.form.submit()". Can be as complex as possible via
Ajax