Hi,
I try to select an option with the result of an ajax request.
All my test :
the var defined as :
Thanks
Chris
I try to select an option with the result of an ajax request.
All my test :
document.getElementByName('add_result').option[value="' + items['result'] + '"].attr('selected', true);The selector named and his id is add_result
jQuery('#add_result option[value="' + items['result'] + '"]').attr('selected', true);
add_result.val(items['result']);
jQuery("#add_result").children("option").val(items['result']);
the var defined as :
add_result = jQuery("#add_result");Do you ahev any idea
Thanks
Chris
if you are trying to select an option:
$("#select_id").find("option[value="+value goes here+"]").prop("selected", true);
Thanks Max,
But no, it doesn't.
I'm going to change the method. Create a new form to manage results.
regards
But no, it doesn't.
I'm going to change the method. Create a new form to manage results.
regards
UP UP UP
Hello Max,
Sorry but I NEED to change select with ajax request.
How can I do it?
It's very important.
I don't understand why the select is hidden. Why this div after?
It should be easier to have only a simple select???
Thanks for your help
Hello Max,
Sorry but I NEED to change select with ajax request.
How can I do it?
It's very important.
I don't understand why the select is hidden. Why this div after?
It should be easier to have only a simple select???
Thanks for your help
Sorry but I NEED to change select with ajax request.
Reload it!
This topic is locked and no more replies can be posted.