On Thursday, July 21, 2011 4:00:55 AM UTC+1, ed wrote:
>
> I'm using the following javascript, so I can't check the HTML, can I? 
> How would I go about debugging this? 
>
> function bookmark_save() { 
> var item = $(this).parent(); 
> var data = { 
> url: item.find("#id_url").val(), 
> title: item.find("#id_title").val(), 
> tags: item.find("#id_tags").val() 
> }; 
> $.post("/save/?ajax", data, function (result) { 
> if (result != "failure") { 
> item.before($("li", result).get(0)); 
> item.remove(); 
> $("ul.bookmarks .edit").click(bookmark_edit); 
> } 
> else { 
> alert("Failed to validate bookmark before saving."); 
> } 
> }); 
> return false; 
> } 
>
> function bookmark_edit() { 
> var item = $(this).parent(); 
> var url = item.find(".title").attr("href"); 
> item.load( 
> "/save/?ajax&url=" + encodeURIComponent(url), 
> null, 
> function () { 
> $("#save-form").submit(bookmark_save); 
> } 
> ); 
> return false; 
> } 
>
> $(document).ready(function () { 
> $("ul.bookmarks .edit").click(bookmark_edit); 
> }); 
>
>  
But surely the problem is that you haven't supplied a value for  `share` in 
your Ajax data.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/mjrC6FcpQJwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to