Dear Expert,
Default login name in the Requestor Name(Select box) ,User may select other Requestor Name also
I have one Requestor Name(Select box). In this select box i wrote one query like this
select username,concat(a.firstname,' ',a.lastname) as Name from dir_user a where active = "1" order by 2.
username is like this (
yapgt@gmail.com.my.) in my table.based on the above query i am saving username in backend, frontend i am displaying name like this (YAP GEE TIAN )
i kept one JQuery function
<SCRIPT>
$(document).ready(function(){
$('select[name=req_name]').on('change', function() {
var x = $(this).find("option:selected").text();
$('#req_id').val(x);
});
});
when i change Requestor Name means i will get the req_id value in the hidden field.when Default login is displaying in the Requestor Name means i am not getting any value in hidden field
because of the above JQuery function.I tried in different ways but i am not getting
For default login name also i want a value in hidden field.when user may select other Requestor Name also i want a value in hidden field
Could you please assist me how to do.
Thanks in Advance.