aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fixmystreet.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-08-03 14:18:01 +0100
committerStruan Donald <struan@exo.org.uk>2011-08-03 14:18:01 +0100
commitfcba996b89491091370286f3b9d1c011fb0670a2 (patch)
tree7cbddb3f60ede94abbe20a5dc73873b658c0adbd /web/js/fixmystreet.js
parentbba75fb159fe919864b1e37f322c5d53eb134d76 (diff)
correct scoping
Diffstat (limited to 'web/js/fixmystreet.js')
-rw-r--r--web/js/fixmystreet.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 4bedaa7cb..3c5c56454 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -61,11 +61,12 @@ $(function(){
if ( category_extras ) {
$('#category_meta').empty();
if ( category_extras[this.options[ this.selectedIndex ].text] ) {
- fields = category_extras[this.options[ this.selectedIndex ].text];
+ var fields = category_extras[this.options[ this.selectedIndex ].text];
$('<h4>Additional information</h4>').appendTo('#category_meta');
fields.sort( function(a,b) { return a.order - b.order } );
- for ( i in fields) {
- meta = fields[i];
+ for ( var i in fields) {
+ var field = '';
+ var meta = fields[i];
field = '<div class="form-field">';
field += '<label for="form_' + meta.code + '">' + meta.description + ':</label>';
field += '<input type="text" value="" name="' + meta.code + '" id="form_' + meta.code + '">';