daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Mar 29th, 2011 208 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I get the following error:
  2.  
  3. doc.createDocumentFragment is not a function
  4. [Break On This Error] fragment = doc.createDocumentFragment();
  5.  
  6. This is the update function:
  7.  
  8. jQuery.fn.submitAndUpdate = function() {
  9.     this.submit(function(){
  10.         var params = {};
  11.         $(this).find("input[checked], input[type='text'], input[type='hidden'], input[type='password'], input[type='submit'], option[selected], textarea").filter(":enabled") .each(function() {
  12.             params[ this.name || this.id || this.parentNode.name || this.parentNode.id ] = this.value;
  13.         });
  14.         $.post(this.getAttribute("action") + "?js=true", params, function(data){
  15.             alert(data);
  16.             $(this).html(data); //heres where the error occurs.
  17.         });
  18.         return false;
  19.     });
  20.     return this;
  21. }
  22.  
  23. This is the data returned in the data variable
  24.  
  25. Update Successful<br/><form class="mediaForm nohijack" id="mediaForm-377" action="file/update/377" method="post"><div><a class="trackHeader" href="#" id="trackHeader-377">Deep Purple - Deep Purple - 05 - Why Didn´t Rosemary.mp3</a><a title="Deep Purple - Deep Purple - 05 - Why Didn´t Rosemary.mp3" href="track://377">+</a></div><div class="hidden trackInfo" id="trackInfo-377"><label for="AudioFile_track">Track</label><input size="2" maxlength="1" name="AudioFile[track]" id="AudioFile_track" type="text" value="1" /><br><label for="AudioFile_year">Year</label><input size="4" maxlength="4" name="AudioFile[year]" id="AudioFile_year" type="text" value="2001" /><br><label for="AudioFile_title">Title</label><input name="AudioFile[title]" id="AudioFile_title" type="text" maxlength="255" value="Deep Purple - Deep Purple - 05 - Why Didn´t Rosemary.mp3" /><br><label for="AudioFile_album">Album</label><input size="20" name="AudioFile[album]" id="AudioFile_album" type="text" maxlength="255" value="N123one1232312" /><br><label for="AudioFile_artist">Artist</label><input size="20" name="AudioFile[artist]" id="AudioFile_artist" type="text" maxlength="255" value="Non1233e" /><br><label class="error" for="AudioFile_comment">Comment</label><textarea style="width:100%;" rows="2" name="AudioFile[comment]" id="AudioFile_comment" class="error">None123123213qwe213213211323321</textarea><div class="errorMessage">Comment is too long (maximum is 30 characters).</div><br><input class="updateButton" id="updateButton-377" type="submit" name="yt0" value="Update" /></div><script type='text/javascript'>
  26.                 $( '#trackInfo-377' ).corner('10px');
  27.                 $( '#trackHeader-377' ).click(function(event) {
  28.                     event.preventDefault();
  29.                     $(this).parent().next().slideToggle();
  30.                 });
  31.  
  32.                 $( '#mediaForm-377' ).submitAndUpdate();
  33.             </script></form>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top