Skip to content

Instantly share code, notes, and snippets.

@qrtt1
Created May 5, 2014 15:33
Show Gist options
  • Save qrtt1/72cb79ce748e1777c55d to your computer and use it in GitHub Desktop.
Save qrtt1/72cb79ce748e1777c55d to your computer and use it in GitHub Desktop.
var firstName = "-first-name-";
var lastName = "-last-name-";
var email = "-email-";
var phone = "-phone-";
var company = "-company-";
var zipCode = "-zip-code-";
var country = "-country-";
var newLimit = "-limitation-";
function select_value(element_id, option_value) {
$("#" + element_id + " option").each(function(){
var name = $.trim($(this).text());
if(name == option_value) {
$(this).attr('selected', 'selected');
$(this).parent().change();
}
});
}
$("#issueType_SERVICE_LIMIT_INCREASE").click().change();
select_value("service-limit-increase-type", "EC2 Instances");
$("#service-limit-increase-type").change();
$("#ec2-instances-new-instance-limit").val(newLimit);
select_value("ec2-instances-operating-system", "Linux/OpenSolaris");
select_value("ec2-instances-primary-instance-type", "t1.micro");
select_value("ec2-instances-frequency-of-usage", "Daily");
$("#service-limit-increase-description").val("we need to increase the spot instance request limitation");
$("#contact-first-name").val(firstName);
$("#contact-last-name").val(lastName);
$("#contact-email").val(email);
$("#contact-phone").val(phone);
$("#contact-company-name-input").val(company);
select_value("contact-country", country);
$("#contact-postal-code").val(zipCode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment