The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
ajax Post not working
Hi all,
I have a script that does the following: Code:
$.ajax({ type: 'POST', url: './misc.php', data: { 'do': 'cloc', 'action': 'updatevp', 'X': X, 'Y': Y} }) Then in the Plugin, hook ?misc_start?, I have: Code:
if($_REQUEST['do'] == 'cloc') { switch($_REQUEST['action']) { case ' updatevp': $vbulletin->db->query_write("UPDATE MyCustomTable SET X = {$vbulletin->input->clean_gpc('r', 'X', TYPE_NUM)}, Y = {$vbulletin->input->clean_gpc('r', 'Y', TYPE_NUM WHERE fkiUserID = {$vbulletin->userinfo['userid']}"); break; } } It works fine if do this: Code:
$.ajax('./misc.php?do=cloc&action=updatevp&X=' + X + '&Y=' + Y) Why can I not ?POST? it? I am creating or at least trying to create my first pluging, so all this is a little new to me, am I missing something simple? Thanks |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|