|
alikara
|
 |
« on: November 19, 2009, 01:48:17 AM » |
|
Hi,
First of all I would like to thank you for creating so useful tool.
My problem is with databinder while sending parameter to php file which updates the database. My code:
var data=this.databinder1.getValue(); data =_.serialize(data);
linb.Ajax(Adres+'/modules/data/test/server.php', data, function(response){ linb.message(response); }, function(msg){ linb.message("onFail: " + msg); }, threadid, {method:'GET'}).start();
It works, when I post parameter directly in address like that:
linb.Ajax(Adres+'/modules/data/test/server.php?customerid=1001', "", function(response){ linb.message(response); }, function(msg){ linb.message("onFail: " + msg); }, threadid, {method:'GET'}).start();
and I'm sure databinder do its job, because I wrote alert(data) in order to see inside databinder.
Consequently: Databinder has all data correctly, but I cannot send data via databinder and receive them in php file. I'm using standard $_GET["customerid"] in php file.
Where is my fault? Thanks Ali
|
|
|
|
|
Logged
|
|
|
|
|
linb
|
 |
« Reply #1 on: November 19, 2009, 03:42:36 AM » |
|
remove this line: data =_.serialize(data);
If you serialize it, you will send url like:
server.php?{"customerid":"1001"}
|
|
|
|
|
Logged
|
|
|
|
|
alikara
|
 |
« Reply #2 on: November 19, 2009, 05:42:08 AM » |
|
Hi Linb,
Thank you for rapid answer.
I removed the line: data=_.serialize(data); However It's still same. I suppose I'm missing something.
I'm sending index.js attached. I'd appreciate it, if you look at the file and tell me what is wrong with my code.
Thanks.
P.S: As I said previously, server.php file is using standard $_GET[]. Does it cause any failure? or is there any special coding in Sigma Framework that I should apply?
|
|
|
|
« Last Edit: November 19, 2009, 09:31:10 AM by alikara »
|
Logged
|
|
|
|
|
alikara
|
 |
« Reply #3 on: November 19, 2009, 09:46:41 AM » |
|
Hi again, It finally works!! I used IAjax instead of Ajax. Then it worked  I'm sure linb.Ajax also works fine, but I couldn't make it worked. Anyway, thank you Linb.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
alikara
|
 |
« Reply #5 on: November 20, 2009, 11:50:20 AM » |
|
Thanks for informing about the latest version.
However I couldn't carry my code to new version. It gives databinder error like:
"TypeError: linb.dataBinder is undefined"
Then I tried creating my application from beginning in new platform. But I got the same databinder error, when I connected an inputbox to the databinder.
Is there any known bug with databinder in v2.2? Or am I missing anything?
Thanks for your help, linb.
|
|
|
|
« Last Edit: November 20, 2009, 12:45:46 PM by alikara »
|
Logged
|
|
|
|
|
linb
|
 |
« Reply #6 on: November 20, 2009, 05:51:46 PM » |
|
It's a new bug, fixed now, please update code from svn.
If you find any other bugs in the latest version, just post here, I'll fix them ASAP.
|
|
|
|
« Last Edit: November 20, 2009, 05:54:30 PM by linb »
|
Logged
|
|
|
|
|
alikara
|
 |
« Reply #7 on: November 21, 2009, 01:01:29 AM » |
|
It works! Thanks linb.
|
|
|
|
|
Logged
|
|
|
|
|