Skip to content

Instantly share code, notes, and snippets.

@masterkain
Created September 3, 2008 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masterkain/8597 to your computer and use it in GitHub Desktop.
Save masterkain/8597 to your computer and use it in GitHub Desktop.
<a href="#" onclick="try {
$(&quot;#diagnoses&quot;).append(&quot;&lt;div class=\&quot;diagnosis\&quot;&gt;\n\t&lt;dl class=\&quot;form\&quot;&gt;\n\t\t\n\t\t&lt;dt class=\&quot;optional\&quot;&gt;Name &lt;/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;input autocomplete=\&quot;off\&quot; id=\&quot;report_diagnosis_attributes__name\&quot; name=\&quot;report[diagnosis_attributes][][name]\&quot; size=\&quot;30\&quot; type=\&quot;text\&quot; /&gt; \n\t\t\t&lt;a class=\&quot;remove_diagnosis\&quot; href=\&quot;#\&quot;&gt;remove&lt;/a&gt;\n\t\t&lt;/dd&gt;\n\t\t\n\t&lt;/dl&gt;\n&lt;/div&gt;&quot;);
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('$(\&quot;#diagnoses\&quot;).append(\&quot;&lt;div class=\\\&quot;diagnosis\\\&quot;&gt;\\n\\t&lt;dl class=\\\&quot;form\\\&quot;&gt;\\n\\t\\t\\n\\t\\t&lt;dt class=\\\&quot;optional\\\&quot;&gt;Name &lt;/dt&gt;\\n\\t\\t&lt;dd&gt;\\n\\t\\t\\t&lt;input autocomplete=\\\&quot;off\\\&quot; id=\\\&quot;report_diagnosis_attributes__name\\\&quot; name=\\\&quot;report[diagnosis_attributes][][name]\\\&quot; size=\\\&quot;30\\\&quot; type=\\\&quot;text\\\&quot; /&gt; \\n\\t\\t\\t&lt;a class=\\\&quot;remove_diagnosis\\\&quot; href=\\\&quot;#\\\&quot;&gt;remove&lt;/a&gt;\\n\\t\\t&lt;/dd&gt;\\n\\t\\t\\n\\t&lt;/dl&gt;\\n&lt;/div&gt;\&quot;);'); throw e }; return false;">add</a>)</h3>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment