Hello,
Is it possible to call an aspx page from an html page (via javascript)
and get some return value from the aspx? I want to get a string from
the aspx and add it to a div, something like :
myDiv.innerHTML += returnValueFromAspx;
Thanks in advance for the response.There are several ways, probably the easiest for a beginner is to use the
browser's built-in XMLHTTPRequest object, and get the string back in the
ResponseText proeperty. Then you just do
document.getElementById('myDiv').innerHTML= myXmlHttp.ResponseText;
Pete
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Bartlett" wrote:
> Hello,
> Is it possible to call an aspx page from an html page (via javascript)
> and get some return value from the aspx? I want to get a string from
> the aspx and add it to a div, something like :
> myDiv.innerHTML += returnValueFromAspx;
> Thanks in advance for the response.
>
Read this easy tutorial on Ajax
http://www.w3schools.com/ajax/default.asp
and check out the ajax section at
http://ajax.asp.net/default.aspx?tabid=47--
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Bartlett" <stef_chr@.yahoo.fr> wrote in message
news:1164902904.001338.81740@.l12g2000cwl.googlegroups.com...
> Hello,
> Is it possible to call an aspx page from an html page (via javascript)
> and get some return value from the aspx? I want to get a string from
> the aspx and add it to a div, something like :
> myDiv.innerHTML += returnValueFromAspx;
> Thanks in advance for the response.
>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment