User Profile

Collapse

Profile Sidebar

Collapse
cheogt
cheogt
Last Activity: Aug 24 '09, 05:46 PM
Joined: Oct 31 '07
Location: Venezuela
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • cheogt
    replied to Ajax Example
    not always



    The ajax is not always async, you can configure it, the example i gave does it online, no async, so you can load data from a data base and the browser waits(freeze?) until it get the answer.

    I check the login in my systems like this, and more, it works good!
    try it...
    See more | Go to post

    Leave a comment:


  • cheogt
    replied to Browser Bugs, Quirks and Inconsistencies
    Problem
    Not possible to prototype the Object() object
    Browser
    Internet Explorer
    Example
    The Javascript code:
    [Code=javascript]
    //create an Alias (via protoype) for getElementById, or getElementByTag Name
    Object.prototyp e.byTag=Object. prototype.getEl ementsByTagName ;
    t=document.byTa g('input');[/code]
    Some relevant HTML:
    [Code=html]<input id="anyName1" type="text"...
    See more | Go to post

    Leave a comment:


  • cheogt
    replied to Ajax Example
    Sorry for my first version, wasn't helpfull...
    Final version, this one works on linux and windows, IE and FireFox

    [CODE=javascript]
    ajax = function(strURL , sSend) {
    var xmlHttpReq=fals e;

    if (!window.Active XObject) ajax.req = new XMLHttpRequest( );
    else ajax.req = new ActiveXObject(" Microsoft.XMLHT TP");

    ajax.req.open(' POST',strURL,fa lse);
    ajax.req.setReq uestHeader('Con tent-Type','applicat ion/x-www-form-urlencoded');...
    See more | Go to post
    Last edited by gits; Nov 15 '07, 08:27 PM. Reason: added code tags & make code readable

    Leave a comment:


  • cheogt
    replied to Ajax Example
    Sorry o forgot to tell that i couldn't make it work with Firefox, it works only with ie, if some one find a way.. please :)
    See more | Go to post

    Leave a comment:


  • cheogt
    replied to Ajax Example
    [CODE=javascript]ajax=function(s trURL,sSend){
    var xmlHttpReq=fals e
    var self=this
    if (window.XMLHttp Request)self.xm lHttpReq=new XMLHttpRequest( )
    else if(window.Activ eXObject)self.x mlHttpReq=new ActiveXObject(" Microsoft.XMLHT TP")
    self.xmlHttpReq .open('POST',st rURL,false)
    self.xmlHttpReq .setRequestHead er('Content-Type', 'application/x-www-form-urlencoded')
    self.xmlHttpReq .onreadystatech ange=function() {...
    See more | Go to post
    Last edited by acoder; Oct 31 '07, 04:10 PM. Reason: Added code tags

    Leave a comment:

No activity results to display
Show More
Working...