Skip to content

Instantly share code, notes, and snippets.

@economysizegeek
Created September 19, 2011 15:08
Show Gist options
  • Save economysizegeek/1226712 to your computer and use it in GitHub Desktop.
Save economysizegeek/1226712 to your computer and use it in GitHub Desktop.
This is some javascript to modify DNS records on my.rackspace.com .
//You have to paste in each one individually since they reload the entire page on submit instead of doing ajax.
$("input[name=host]")[0].value = "REPLACE_WITH_DOMAIN"
$('select[name=record-type]').attr("selectedIndex",0) //A
$("input[name=target]")[0].value = "REPLACE_WITH_IP"
$("input[name=recordAdd]")[0].click();
$("input[name=host]")[0].value = "REPLACE_WITH_DOMAIN"
$('select[name=record-type]').attr("selectedIndex",2) //CNAME
$("input[name=target]")[0].value = "REPLACE_WITH_OTHER_DOMAIN"
$("input[name=recordAdd]")[0].click();
$("input[name=host]")[0].value = "REPLACE_WITH_DOMAIN";
$("input[name=priority]")[0].value = "10" //MX Value
$("input[name=target]")[0].value = "REPLACE_WITH_MX VALUE"
$("input[name=recordAdd]")[0].click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment