get the zeroth form in the returned array

darcs-hash:20080918145545-5ed1f-11100b4bd89ef289f31bbfd37a58c4395469f808.gz
This commit is contained in:
Evan Prodromou 2008-09-18 10:55:45 -04:00
parent 4520daac3e
commit 935e9b8509

View File

@ -57,14 +57,14 @@ $(document).ready(function(){
var favoptions = {dataType: 'xml', var favoptions = {dataType: 'xml',
success: function(xml) { success: function(xml) {
var new_form = $('form.disfavor', xml); var new_form = $('form.disfavor', xml).get(0);
var id = new_form.id.replace('disfavor', 'favor'); var id = new_form.id.replace('disfavor', 'favor');
$('form#'+id).replace(new_form); $('form#'+id).replace(new_form);
}}; }};
var disoptions = {dataType: 'xml', var disoptions = {dataType: 'xml',
success: function(xml) { success: function(xml) {
var new_form = $('form.favor', xml); var new_form = $('form.favor', xml).get(0);
var id = new_form.id.replace('favor', 'disfavor'); var id = new_form.id.replace('favor', 'disfavor');
$('form#'+id).replace(new_form); $('form#'+id).replace(new_form);
}}; }};