Possible Duplicate:
How do I change the selected option in a FogBugz drop-down field using jQuery (javascript)?
Hi,
I'm trying to use BugMonkey to pre-populate the email "From" address that is used when clicking on the "Reply" or "Email" buttons attached to case notes. (We have multiple mailboxes set up and FB sometimes defaults to an unexpected choice, which users are missing and so emails are going out from the wrong address.)
Looking at some other sample script on this site, I've come up with:
$(document).ready(function() {
var textBox = $("#idDropList_sFrom_oText");
if (textBox.length) {
textBox.val('"Some Name" <some@email.address>');
}
});
This does indeed change the value of the from field on screen, but the form still submits with the email address the page originally loaded with.
I've tried using Firebug to work out what I should be setting that I'm not, but of course it's all dynamic HTML with event hooks and I can't find the right bit of code. (I can see that the form is POSTing with an "sFrom" field, but it's not obvious how this is being set when I click on the "Send" button.)
Can anyone help or point me in the right direction?
Thanks,
- Lee
("Ask a question" seems to get me here at "submit a feature request"... I just want to ask a question, not submit a feature request, so I hope this is the right place to do that.)
#sFromelement, see fogbugz.stackexchange.com/questions/8261/…. Your question pointed ME in the right direction, thanks! – Michel de Ruiter♦ Sep 22 at 14:00