| | |
AJAX And PHP
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
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>
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>
Iam getting this error,,,,
Error:The xajax JavaScript component could not be included, Perhaps the URL is incorrect?
URL:xajax/xajax_core.js
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
Iam getting this error,,,,
Error:The xajax JavaScript component could not be included, Perhaps the URL is incorrect?
URL:xajax/xajax_core.js
Error:The xajax JavaScript component could not be included, Perhaps the URL is incorrect?
URL:xajax/xajax_core.js
There's no need for you to include the .JS file like that. Use
<script type="javascript" src="xajax_js/xajax_core.js"></script>
<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
Thanks.
Ajtrichards Web Solutions | http://www.ajtrichards.co.uk
Retenovate | http://www.retenovate.com
![]() |
Similar Threads
- [For Hire] Php, Mysql, ASP, AJAX, DHTML programmer (Post your Resume)
- Help needed working with prototype.js and php (JavaScript / DHTML / AJAX)
- Not a function ... why? (JavaScript / DHTML / AJAX)
- Levyo Ajax Gallery supports Firefox 2.0.1 only?? (IT Professionals' Lounge)
- Levyo Ajax Technology Gallery (JavaScript / DHTML / AJAX)
- AJAX and Smarty (PHP)
- PHP Script (PHP)
- AJAX in Apache? (Linux Servers and Apache)
Other Threads in the PHP Forum
- Previous Thread: Related Searches/Queries Script.. Help!
- Next Thread: images and drop down list boxes
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube






