Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 08:44:26 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: AJax and IAjax  (Read 820 times)
dman65
Jr. Member
**
Posts: 6


View Profile
« on: October 21, 2009, 10:54:12 AM »

Hello,

I have been searching for a Visual Basic like Ajax tool for a while and I was pretty happy when I came across the Visual Ajax product. I am currently experimenting with it to see if I want to use it for rewriting some internal apps and for using in future new in-house apps.

After creating a basic form, I have been attempting to figure out how to use the Ajax and IAjax functions to communicate with a server.

From the looks of things, it looks to me like the call to IAjax is supposed to be of the same format as the call to Ajax. If I run the code below that I have attached to a button with Ajax I get the "It Works" default Apache web page back from the server, but if I change Ajax to IAjax, the onFail routine executes and indicates that nothing was returned from the server.

Can anyone tell me what the issue might be here? It is pretty straight forward. I am not even trying to post any variables at this point. I have tried both the "post" and "get" methods and both return the same results.


        function(profile,e,src,value){
            var hash = "";
          linb.Thread.observableRun(function(threadid){
              linb.Ajax('http://localhost/index.html',
                  hash,
                  function(response){
                      linb.message(_.unserialize(response));
                      alert(response);
                  },
                  function(msg){
                      linb.message("onFail: " + msg);
                  },
                  threadid,
                  {method:'GET'}).start();
              })
         }
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #1 on: October 23, 2009, 12:48:21 AM »

linb.Ajax/linb.SAjax/linb.Iajax have different mechanisms. For exmpales, if you want to get "A" from server,

If using linb.Ajax, your server just returns :

"A"

But if using linb.SAjax, your server has to return:

linb.$response({data:"A",id:"the request id"});

If using linb.IAjax, your server has to returns :
<script>window.name={data:"A",id:"the request id"};</script>


So, if you want to get a page's whole content, only linb.Ajax can do it.
Logged
dman65
Jr. Member
**
Posts: 6


View Profile
« Reply #2 on: October 27, 2009, 09:36:51 AM »

Thanks for the clarification. I ended up just installing enough packages to make everything run on my local computer.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!