Sandbox91

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 60: Line 60:
  
 
   --%% あらかじめセットしてあるデータの場合は、チェックを付けておく - データは&&区切りで渡す %%--
 
   --%% あらかじめセットしてあるデータの場合は、チェックを付けておく - データは&&区切りで渡す %%--
--  if(string.match("{{#get:initset}}", "" .. list[i] .. "", 0)) then
+
  if(string.match("{{#get:initset}}", "" .. list[i] .. "", 0) == nil) then
  if(string.match("ccc ccc", "ccc ccc", 0)) then
+
    checked = ' checked="yes"'
+
  else
+
 
     checked = ''
 
     checked = ''
 +
  else
 +
    checked = ' checked="yes"'
 
   end
 
   end
  
Line 70: Line 69:
 
   if(flag[i] == 1) then
 
   if(flag[i] == 1) then
 
     -- <nowiki>{{#formtag:input|type="checkbox" value="data" name="list" id="data"}}{{#formtag:label|for="data"|data}}</nowiki>
 
     -- <nowiki>{{#formtag:input|type="checkbox" value="data" name="list" id="data"}}{{#formtag:label|for="data"|data}}</nowiki>
     print('{{#form' .. 'tag:input|type="checkbox" value="' .. list[i] .. '" name="list" id="' .. list[i] .. checked .. '"}}{{#form' .. 'tag:label|for="' .. list[i] .. '"|' .. list[i] .. '}}<br>')
+
     print('{{#form' .. 'tag:input|type="checkbox" value="' .. list[i] .. '" name="list" id="' .. list[i] .. '"' .. checked .. '}}{{#form' .. 'tag:label|for="' .. list[i] .. '"|' .. list[i] .. '}}<br>')
 
   else
 
   else
 
     print(list[i] .. "<br>")
 
     print(list[i] .. "<br>")

Revision as of 22:18, 22 January 2009



Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox