Skip to main content

Ajax & OOPs Concept

class test
{
var $myvar;
function test($param)
{
$this->myvar = $param;
}
//function _construct()
//{
// $this->$myvar = $param;
//}
function myfunction($mvar)
{
echo "
Execute MyFunction".$mvar;
return;
}
}

$obj = new test("20");
echo $obj->myvar;
$obj->myfunction("10");

?>





*********************** AJAX ***************




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">

var http = false;



if(navigator.appName == "Microsoft Internet Explorer")

{

http = new ActiveXObject("Microsoft.XMLHTTP");

}

else

{

http = new XMLHttpRequest();

}

var ajax;

function replace() {



//document.getElementById('mymap').innerHTML = "Hello, <b>AJAX</b> world!";

//ajax= new Ajax.Updater('mymap','locinfo.php',(method:'get'));

http.abort();

http.open("GET", "locinfo.php", true);

http.onreadystatechange=function() {

if(http.readyState == 4) {

document.getElementById('mymap').innerHTML = http.responseText;

}

}

http.send(null);

window.setTimeout('replace()',5000);

}

//window.setTimeout('replace()',2000);



</script>

<link rel="stylesheet" href="../include/menu4.css" type="text/css" />

</head>

<body onLoad="javascript:replace()">



<div id="mymap" >

GREEN START

</div>





</body>

</html>

 

Comments

Popular posts from this blog

PHP Interview Questions & Answers

Web Development PHP Difference between echo and print? void echo ( string $arg1 [, string $...] ) Outputs all parameters. echo() is not actually a function (it is a language construct), so you are not required to use parentheses with it. echo() (unlike some other language constructs) does not behave like a function, so it cannot always be used in the context of a function. Additionally, if you want to pass more than one parameter to echo(), the parameters must not be enclosed within parentheses. echo() also has a shortcut syntax, where you can immediately follow the opening tag with an equals sign. This short syntax only works with the short_open_tag configuration setting enabled. I have foo. print --- out put a string print behaves like a function and you can return values and echo can't Prin can be used as a part of more complex operations What is the use of ob_start in php? ob_start — Turn on output buffering According to PHP manual* Description bool ob_start ( [callback $outpu...

iPhone Project Version Controlling System - SVN

iVersion is an iPhone SVN client which allows developers to edit and manage their code away form their desktop. More information can be found at  http://www.benreeves.co.uk . Here are the Promo code: WWX3A3WWY7LX, ELTKP7HNXE7L, 7PP4NK969RJ7, A43LWXK6Y4R4, LT4TL6ATTFRM, F9WLLK4R67PP, EKTN36FYWWLX, 4MPYA3FWPAEA, 6WFTFAM694YY, EKJ79J69YHLY, T6NNNHHTJLEE, L9WXP9YY36YA, R6LH4M34XH7P, K7K9EAMAEX94, Y4PEMKEXLTWX, HTHEWNJHPW49, HY34TN7P9LL3, 4FT339Y6PREX, PE9NPP9PE64X, 7MTLPXTPJA66, ALWM3LLHEPFN, ETF4L94RAFE4, 4K93KNXAH6LN, PW3AW6HHL3MN, WJ9HJL76JHHJ, W9XLA6RETFL3, WY7WM7H94AEA, 3NJLA3FKHRPN

API-First Web Development in 2026: Why Your Architecture Matters More Than Your Framework

  ⚙️ API-First Web Development in 2026: Why Your Architecture Matters More Than Your Framework 4 In 2026, successful web applications are not defined by the framework they use. They are defined by how well their APIs are designed . Whether you build with modern stacks or legacy systems, API-first architecture is becoming the backbone of scalable web development. If you're building SaaS, marketplaces, enterprise dashboards, or startup MVPs — this approach is critical. 🚀 What Is API-First Development? API-first means: Design APIs before frontend implementation Define contracts clearly (request/response structure) Document endpoints properly Treat APIs as products Instead of building UI first and adding backend later, you design the system core first. 🧠 Why API-First Is Trending in 2026 1️⃣ Multi-Platform Reality Today, your backend may serve: Web app Mobile app Admin dashboard Third-party integrations AI agents Without strong API architecture, scaling becomes chaotic. 2️⃣ Frontend ...