Jump to content


Photo

Nopermission returned when making a new ajax request


  • This topic is locked This topic is locked
3 replies to this topic

#1 nlassit

nlassit

    IPB Newbie

  • +Clients
  • 38 posts

Posted 30 June 2012 - 07:27 PM

http://community.inv...x-requests-r747

I've been using that guide to create an ajax request and haven't yet changed the simple "good" or "bad" response that's outlined there.

I'm having trouble with it responding with "nopermission".

I've read this: http://community.inv...ion-errors-r258

I've tried a variety of ways to creating the GET ajax.
- having the md5check parameter set to ipv.vars['secure_hash']
- passing secure_key in the query string with it set to ipv.vars['secure_hash']

I have done exactly what the guide in the top link outlines as far as creating an application and module. The GET response is successful, but the response is "nopermission". I'm guessing by the second link it has something to do with that secure_hash not matching maybe, but I'm not sure what I could be doing wrong.

Here's the current version of the code I have. I'm running this from a page created in ip.content. The code is actually in another file that I "include" in the page.

new Ajax.Request( ipb.vars['base_url'] + "app=csharemap&module=ajax&section=map&do=doExecute&secure_key="+ipb.vars['secure_hash'],
{
method: 'get',
evalJSON: 'force',
parameters: {
//'md5check' : ipb.vars['secure_hash'],
'mapCoords' : map.getBounds().toUrlValue()
//'string' : $('some-id').encodeParam()
}, onSuccess: function(t) {
if( Object.isUndefined( t.responseJSON ) )
{
	 alert( "Bad Request" );
} else if ( t.responseJSON['error'] ) {
	 alert( t.responseJSON['error'] );
} else {
	 alert( "Successful!" );
}
}
});


#2 Marcher Technologies

Marcher Technologies

    $life=FALSE;$code=TRUE;$time--;

  • +Clients
  • 11,153 posts

Posted 30 June 2012 - 11:17 PM

This is not feedback, is a request for code help.

#3 nlassit

nlassit

    IPB Newbie

  • +Clients
  • 38 posts

Posted 30 June 2012 - 11:45 PM

Yes, that's right. I mistakenly thought I was in the Application support section. I'll repost there.

#4 Mark H

Mark H

    Gramps

  • IPS Staff
  • 327 posts

Posted 30 June 2012 - 11:50 PM

I see you've posted there, so I'll close this topic here.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users