owner_sel.onChange = function(){
if(this.form.state_id.value == <%= $STATE_NEW %> ) {
this.form.state_id.value = <%= $STATE_ASSIGNED %> ;
}
}
I believe I'm calling the Perl variable wrong.
I currently have this code which checks if a select value is $STATE_NEW and if it is then switch it to $STATE_ASSIGNED but it is not working.
Can anyone tell me whats wrong with my call. Thanks
data-*HTML attribute, and pull them out of the DOM:<div id="states" data-state-new="<%= $STATE_NEW %>" data-state-assigned="<%= $STATE_ASSIGNED %>"></div>, then with jQuery you can read these as easily as e.g.$('#states').data('state-new').