Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Getting a 405 when using $.post with sammy
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
alexandroid  
View profile  
 More options Mar 21 2012, 12:25 pm
From: alexandroid <kamot...@gmail.com>
Date: Wed, 21 Mar 2012 09:25:23 -0700 (PDT)
Local: Wed, Mar 21 2012 12:25 pm
Subject: Re: Getting a 405 when using $.post with sammy
Well are you sure that "$.post(this.href)" does what you want? I.e.
that this.href points to the right location? Are HTTP post requests
even supposed to with with Javascript hash tags in them?

~Alex

On Mar 20, 1:54 am, devghost <robertbl...@gmail.com> wrote:

> To follow up, if I do an ordinary form post such as shown below. It works
> as it should.
> But somehow I can't get it to work when I want to do a post from a link. My
> guess, as
> I look into it more is that it probably doesn't have anything to do with
> Sammy, just me
> doing something wrong...

> This works:
> <form action="#/bookmark/delete" method="post">
>         <input type="submit" value="Test" />
> </form>

> And this doesn't, giving a 405:
> <a href="#/bookmark/delete" onclick="$.post(this.href); return
> false;">Delete</a>

> Kind Regards,
> Robert

> Den måndagen den 19:e mars 2012 kl. 21:47:10 UTC+1 skrev devghost:

> >  Hi,

> > I'm trying to do a post using jquery to a sammy route from a link but I
> > keep getting 405 method not allowed.
> > If I do a similar post but to a server side url it works.

> > This is the link I'm using to post with:
> >   <a href="#/bookmark/delete" onclick="$.post(this.href); return
> > false;">Delete</a>

> > And this is the sammy route setup:
> >     Sammy(function () {
> >         this.use(Sammy.Title);
> >         this.element_selector = '#content';

> >         this.get('#/', function (context) {
> >           ...
> >         });

> >         this.post('#/bookmark/delete', function (context) {
> >             alert('Foo');
> >         });

> >     }).run("#/");

> > Any help is highly appreciated.
> > Kind Regards,
> > Robert


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.