Ignore:
Timestamp:
05/27/05 06:50:03 (14 years ago)
Author:
gocher
Message:

plugin Forms

textarea gets new attributes: wrap, readonly disabled, tabindex, accesskey

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/Forms/popups/form.html

    r199 r200  
    77 
    88<script type="text/javascript"> 
     9 
     10var fields = ["f_name", "f_action", "f_method", "f_enctype", "f_target"]; 
     11 
    912function Init() { 
    1013  window.resizeTo(400, 170); 
     
    1215        __dlg_init(); 
    1316  var param = window.dialogArguments; 
    14   document.getElementById("f_name").value = param.f_name; 
    15   document.getElementById("f_action").value = param.f_action; 
    16   document.getElementById("f_method").value = param.f_method; 
    17   document.getElementById("f_enctype").value = param.f_enctype; 
    18   document.getElementById("f_target").value = param.f_target; 
     17  for (var i in fields) { 
     18    document.getElementById(fields[i]).value = param[fields[i]]; 
     19  } 
    1920        document.getElementById("f_name").focus(); 
    2021}; 
     
    3334  } 
    3435  // pass data back to the calling window 
    35   var fields = ["f_name", "f_action", "f_method", "f_enctype", "f_target"]; 
    3636  var param = new Object(); 
    3737  for (var i in fields) { 
    38     var id = fields[i]; 
    39         var el = document.getElementById(id); 
    40     param[id] = el.value; 
     38    param[fields[i]] = document.getElementById(fields[i]).value; 
    4139  } 
    4240  __dlg_close(param); 
Note: See TracChangeset for help on using the changeset viewer.