CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 AJAX - passing record info

Print topic Send  topic

Author Message
FERAD

Posts: 51
Posted: 09/07/2007, 1:19 PM

I am trying to pass several fields from a record back to the webpage. How can I transfer several fields in one call and then separate them back on the client side. Any code samples would be greatly appreciated. Specifically I am using XAJAX since it is primarilly designed for PHP.

Thanks in advance.
View profile  Send private message
djgjohng

Posts: 28
Posted: 09/07/2007, 6:12 PM

Do you mean passing the field values as URL parameters?

Would an array of values be the answer? Loop through the values and push into an array. Then pass add a session variable. Get the session var and read from the array.

If this is on the right track let me know and I will provide an example.

JG
View profile  Send private message
FERAD

Posts: 51
Posted: 09/07/2007, 6:39 PM

Not as URL parameters. They would be the return value of "return $response;" and either get applied directly to the appropriate Labels or Text Boxes within a Form. Hopefully this can be done with only one call to the server for response. Basically using a value entered from a selectable menu and returning several related fields back to the form without screen refresh.
View profile  Send private message
Hidran
Posted: 09/08/2007, 4:06 AM

I think you can send a JSON response like:
$res="{user_name:'$user_name',phone:'$phone'}";

and in the function that receives the ajax response:
var result=eval(myajaxresp);
alert(result['user_name']);

The point is sending from php a string in JSON notation
and then transforming it in an object in javascript.
Hidran
"FERAD" <FERAD@forum.codecharge> ha scritto nel messaggio
news:546e1fd3a6e061@news.codecharge.com...
> Not as URL parameters. They would be the return value of "return
> $response;"
> and either get applied directly to the appropriate Labels or Text Boxes
> within a
> Form. Hopefully this can be done with only one call to the server for
> response.
> Basically using a value entered from a selectable menu and returning
> several
> related fields back to the form without screen refresh.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>

wkempees
Posted: 09/10/2007, 5:02 AM

http://forums.codecharge.com/posts.php?post_id=88474&s_...+dynamic+client

username

Posts: 24
Posted: 09/13/2007, 3:53 AM

Thanks
does any body have any example for ajax in CCS php
please give me poject example for ajax CCS php

amir.email [at]yahoo.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.