Jump to content

Some php ajax help


phpdemon

Recommended Posts

Ok this is my first post here so hopefuly some one can help...

 

Im passing a value from a normal html input box to a facebook ajax function. My problem that i am having is that when there is more then one word in the input box i get a error with the code that it brings back, it says that my java script vars "ga" "s" are undefined. Then "g" where im two words are coming from only shows one word. Btw when i just use one word it all works. Anyways I believe its the space in between the two words in the input field thats screwing me up. Does any one have any idea on how to solve this thanks... Below i is my ajax function.

remember this is facebook code so its going to differ from normal.

 

function do_ajax8() {

 

var g = document.getElementById('g').getValue();

var s = document.getElementById('s').getValue();

var ga = document.getElementById('ga').getValue();

 

var ajax = new Ajax();

 

ajax.responseType = Ajax.FBML;

 

ajax.requireLogin = true;

 

ajax.ondone = function (data) {

// var myDial = new Dialog(Dialog.DIALOG_POP);

// myDial.showMessage("Test",data)

document.getElementById('sideBox3').setInnerFBML(data);

}

 

ajax.post('http://66.237.84.68/guildaddff.php?g='+g+'&s='+s+'&ga='+ga);

}

Link to comment
https://forums.phpfreaks.com/topic/175461-some-php-ajax-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.