Side navigation
#2940 closed bug (invalid)
Opened May 27, 2008 01:45AM UTC
Closed January 08, 2009 05:01AM UTC
1.2.6.js - exception caused by doing .append() or .html() - please see the code in description
Reported by: | gigafloat | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | core | Version: | |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery(document).find('#deck_edit_form')
.append(<form action="/decks/40" method="post"><div style="margin:0;padding:0"><input name="_method" type="hidden" value="put" /></div>
<div class="top_text">
<table class="table">
<tr>
<td class="field_label"><label>Title</label></td>
<td><input id="deck_title" name="deck[title]" size="30" type="text" value="15,14" />
<input id="deck_cards" name="deck[cards]" type="hidden" value="[15,14]" />
</td>
</tr>
<tr><td></td>
<td><input name="commit" type="submit" value="Save" /> or
<a href="/cards">cancel</a>
</td>
</tr>
</table>
</div>
</form>);
Could you provide a full test case ? an html file with all the js code (no need for all the jquery source).
You could had said the exception message at least :)
Note that javascript doesn't support multiline strings just like that, and you seem to be missing the " wrapping the html (unless the trac removed them, of course).
Would you first check these, and if it works, do close the ticket as invalid.
Else, please post a test case. Thanks.