AJAX And PHP

Reply

Join Date: Jul 2007
Posts: 18
Reputation: venu@baylogic is an unknown quantity at this point 
Solved Threads: 0
venu@baylogic's Avatar
venu@baylogic venu@baylogic is offline Offline
Newbie Poster

AJAX And PHP

 
0
  #1
Jul 31st, 2007
Hai friends,
Please help me that how can i solve this problem,
how can i include AJAX in PHP,Can u tell me that how can i configure system for AJAX.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Solved Threads: 35
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: AJAX And PHP

 
0
  #2
Jul 31st, 2007
You need to learn more about Ajax as you don't include ajax into PHP. In fact PHP really doesn't even care or know about Ajax. All you need to know with your PHP code is whether or not to send out XML headers or not. That's it.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 142
Reputation: MitkOK is an unknown quantity at this point 
Solved Threads: 12
MitkOK's Avatar
MitkOK MitkOK is offline Offline
Junior Poster

Re: AJAX And PHP

 
0
  #3
Jul 31st, 2007
Last edited by MitkOK; Jul 31st, 2007 at 12:12 pm.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 18
Reputation: venu@baylogic is an unknown quantity at this point 
Solved Threads: 0
venu@baylogic's Avatar
venu@baylogic venu@baylogic is offline Offline
Newbie Poster

Re: AJAX And PHP

 
0
  #4
Aug 1st, 2007
Thank U Friend for Ur reply...........
Can U give more explanation about it.........
Venu.K
BayLogic Technologies,
Visakhapatnam,
India,
venusmartsmile@gmail.comBphone:91+9247262650
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 18
Reputation: venu@baylogic is an unknown quantity at this point 
Solved Threads: 0
venu@baylogic's Avatar
venu@baylogic venu@baylogic is offline Offline
Newbie Poster

Re: AJAX And PHP

 
0
  #5
Aug 2nd, 2007
Hai friend,
Can U tell me that how can i solve this error,
its giving error i.e printing whole "xajax_core.js" file,
<?php
require('xajax_core/xajax.inc.php');
require('xajax_js/xajax_core.js');
$xajax=new xajax();
$xajax ->registerFunction("helloWorld");

function helloWorld($isCaps)
{
if ($isCaps)
$text = "<b>BAYLOGIC TECHNOLOGIES...VENU !</b>";
else
$text = "<b>baylogic technologies...venu!</b>";

$objResponse = new xajaxResponse();
$objResponse->assign("div1","innerHTML",$text);

return $objResponse;
}
function setColor($sColor)
{
$objResponse = new xajaxResponse();
$objResponse->assign("div1","style.color", $sColor);

return $objResponse;
}
$xajax->registerFunction("helloWorld");
$xajax->registerFunction("setColor");
$xajax->processRequest();

echo '<?xml version="1.0" encoding="UTF-8"?>';
?>

<html>
<head>
<title>xajax example</title>
<?php
// output the xajax javascript. This must be called between the head tags
$xajax->printJavascript();
?>
<script type='text/javascript'>

window.onload = function() {
// call the helloWorld function to populate the div on load
xajax_helloWorld(0);
// call the setColor function on load
xajax_setColor(document.getElementById('colorselect').value);
}

</script>
</head>
<body style="text-align:center;">
<div id="div1" name="div1"> </div>
<br/>

<button onclick="xajax_helloWorld(0)" >Click Me</button>
<button onclick="xajax_helloWorld(1)" >CLICK ME</button>
<select id="colorselect" name="colorselect"
onchange="xajax_setColor(document.getElementById('colorselect').value);">
<option value="black" selected="selected">Black</option>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="blue">Blue</option>
<option value="yellow">Yellow</option>
<option value="cyan">Cyan</option>
</select>
</body>
</html>
Venu.K
BayLogic Technologies,
Visakhapatnam,
India,
venusmartsmile@gmail.comBphone:91+9247262650
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 18
Reputation: venu@baylogic is an unknown quantity at this point 
Solved Threads: 0
venu@baylogic's Avatar
venu@baylogic venu@baylogic is offline Offline
Newbie Poster

Re: AJAX And PHP

 
0
  #6
Aug 2nd, 2007
Iam getting this error,,,,
Error:The xajax JavaScript component could not be included, Perhaps the URL is incorrect?
URL:xajax/xajax_core.js
Last edited by venu@baylogic; Aug 2nd, 2007 at 4:21 am. Reason: mitkok,mitk0k
Venu.K
BayLogic Technologies,
Visakhapatnam,
India,
venusmartsmile@gmail.comBphone:91+9247262650
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 18
Reputation: venu@baylogic is an unknown quantity at this point 
Solved Threads: 0
venu@baylogic's Avatar
venu@baylogic venu@baylogic is offline Offline
Newbie Poster

Re: AJAX And PHP

 
0
  #7
Aug 2nd, 2007
Iam getting this error,,,,
Error:The xajax JavaScript component could not be included, Perhaps the URL is incorrect?
URL:xajax/xajax_core.js
Venu.K
BayLogic Technologies,
Visakhapatnam,
India,
venusmartsmile@gmail.comBphone:91+9247262650
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 187
Reputation: phper is an unknown quantity at this point 
Solved Threads: 15
phper's Avatar
phper phper is offline Offline
Junior Poster

Re: AJAX And PHP

 
0
  #8
Aug 3rd, 2007
There's no need for you to include the .JS file like that. Use

<script type="javascript" src="xajax_js/xajax_core.js"></script>
If my post is useful please add to my reputation.
Thanks.

Ajtrichards Web Solutions | http://www.ajtrichards.co.uk
Retenovate | http://www.retenovate.com
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC