Thursday, March 29, 2012
Newbie : aspx and javascript
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.
>
Newbie : aspx and javascript
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.frwrote in message
news:1164902904.001338.81740@.l12g2000cwl.googlegro ups.com...
Quote:
Originally Posted by
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.
>
Saturday, March 24, 2012
Newbie help Webpage that pings servers and returns if it is up.
If it is up i want it to change an image to another image to tell me the server is down.
Can anyone help?You could use something like:
try { WebRequest test = WebRequest.Create("http://www.domain.com");
//display "up" image
} catch ( Exception e ) {
//display "down" image
}
For more information on System.Net.WebRequest use the link below (.NET Class Library) and in the left frame go to System.Net -> WebRequest.Hey thanx for the replay but im new to this stuff is there anyway you could give me a little more info?