What you're likely facing is that the element that you're attempting to select via jQuery here is being written into the DOM by some other script that's running on the page as your code is working just fine from the console but not in ready()
In all honesty the easiest solution is likely a dirty hack to delay your script for a short period of time. Give this a whirl:
$().ready(function(){
function insertNewElement() {
var newOption = $('<option value="'+val+'">'+val+'</option>');
$('select[originalid="V1_I1_D6"]').eq(0).append(newOption);
}
window.setTimeout(insertNewElement, 1000);
});
All it's doing is waiting 1000ms to execute your code. You may need to fiddle with the timing and it's not going to be 100% reliable. For example if your user has a horrible internet connection and the way that the form you want to manipulate is loading data after ready()
fires and it takes longer than 1000ms to return it's going to fail.
That said for many environments this is going to be good enough.