Oops... I should add that after this line:

    if (myRequest.readyState==4) {

you grab the myRequest.ResponseText property, which will have the data from
the server.


On 12/15/05, Peter Brunone <[EMAIL PROTECTED]> wrote:
>
> Ah, the question everyone is asking these days!
>
> Here is some basic code that will let you make an ajax call from IE and
> Mozilla.  I'm sure if you google on "ajax request" you'll get a lot more
> information.
>
> Cheers,
>
> Peter
>
> var myRequest;
> var sRequestPath = "
> http://whereverthisis.com/myinfopage.aspx?somevar=this&othervar=that";;
>
> if (window.XMLHttpRequest) {
>     //alert("Firefox: Sending request to \n" + sRequestPath); // Debugging
>     myRequest = new XMLHttpRequest();
>     myRequest.overrideMimeType('text/xml');
>     }
> else if (window.ActiveXObject) {
>     //alert("IE: Sending request to \n" + sRequestPath); // Debugging
>     myRequest = new ActiveXObject("Microsoft.XMLHTTP");
>     }
> myRequest.onreadystatechange = function() {
>     if (myRequest.readyState==4) {
>         }
>     }
>
> myRequest.open('GET', sRequestPath, true);
> myRequest.send(null);
>
>
> On 12/15/05, faisal dar <[EMAIL PROTECTED]> wrote:
> >
> > I want to refresh my web page without Postback event.
> >
> > I mean via using ajax but how?
> >
> > Actually, I Have a page with menu, when first time my
> > page will load it will load from the server, but for
> > the next time if i click on the menu, it will load
> > from the cache of client.
> >
> > This is possible via ajax, but I need some sample code
> > to implement it.
> >
> > Thanks,
> >
> > DAR
>
>


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to