Cake has a  buil-in helper for ajax request that use prototype. In the
sample you gave, the code would have been much shorter with cake.
Check the manual on cakeforge.org

On Jul 11, 9:21 am, venki <[EMAIL PROTECTED]> wrote:
> Hi,
> I am working in php for last 2 years.I want to know lot of ajax
> functions and learn  one frame work fully.
> Is frame work is useful for interviews for my php interviews?
> Can I prepare only PHP and ajax for my interviews?
>
> which frame work is very good for developing PHP websites nowadays?
> Is prototype frame work is good or not?
> Can I use prtotype frame work for my php coding?
> Please check below link regarding prototype frame 
> work.http://www.prototypejs.org/
>
> Please look into belo ajax code:
>
> <script type="text/javascript" language="javascript">
> function makeHttpRequest(url, callback_function, return_xml)
> {
>    var http_request = false;
>
>    if (window.XMLHttpRequest) { // Mozilla, Safari,...
>        http_request = new XMLHttpRequest();
>        if (http_request.overrideMimeType) {
>            http_request.overrideMimeType('text/xml');
>        }
>    } else if (window.ActiveXObject) { // IE
>        try {
>            http_request = new ActiveXObject("Msxml2.XMLHTTP");
>        } catch (e) {
>            try {
>                http_request = new ActiveXObject(" Microsoft.XMLHTTP");
>            } catch (e) {}
>        }
>    }
>
>    if (!http_request) {
>        alert('Unfortunatelly you browser doesn\'t support this
> feature.');
>        return false;
>    }
>    http_request.onreadystatechange = function() {
>        if (http_request.readyState == 4) {
>            if (http_request.status == 200) {
>                if (return_xml) {
>                    eval(callback_function +
> '(http_request.responseXML)');
>                } else {
>                    eval(callback_function +
> '(http_request.responseText)');
>                }
>            } else {
>                alert('There was a problem with the request.(Code: ' +
> http_request.status + ')');
>            }
>        }
>    }
>    http_request.open('GET', url, true);
>    http_request.send(null);}
>
> </script>
> <a href="#" onclick="makeHttpRequest('test.html', 'alert')" >Make a
> request</a>
>
> Is the above javascript coding  only ajax or is there any different
> types of coding for ajax .
>
> I hope you will help me on this.please.....
>
> Regards,
> Venki


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to