Ok. That last one actually worked. Just needed to a browser refresh to
re-load the script.

That's a total noob mistake. My bad. Thanks all :)

On Jul 21, 10:49 am, ed <ed.agu...@gmail.com> wrote:
> You mean like this:
>
>         var data = {
>                 url: item.find("#id_url").val(),
>                 title: item.find("#id_title").val(),
>                 tags: item.find("#id_tags").val(),
>                 share: item.find("#id_share").val()
>         };
>
> Tried it. 'share' is still showing up false...
>
> On Jul 21, 1:29 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
>
>
>
>
>
>
>
> > 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 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