D
dk381
Hi,
I am wondering if I can use javascript to get a page content from a
URL.
What I am trying to do is that when a user clicks on a button, it goes
to the server and retrieve some texts and place it in a textarea.
Thanks in advance.
David
<HTML>
<HEAD>
<SCRIPT LANGUAGE= "JavaScript1.2">
function getPage( url ) {
//is there a way in javascript to get the content from a url
var content = Get the content of the given url?
alert( content );
}
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE="button" VALUE="getpagecontent" onClick="getPage(
'http://www.someurl.com' );">
</FORM>
</BODY>
</HTML>
I am wondering if I can use javascript to get a page content from a
URL.
What I am trying to do is that when a user clicks on a button, it goes
to the server and retrieve some texts and place it in a textarea.
Thanks in advance.
David
<HTML>
<HEAD>
<SCRIPT LANGUAGE= "JavaScript1.2">
function getPage( url ) {
//is there a way in javascript to get the content from a url
var content = Get the content of the given url?
alert( content );
}
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE="button" VALUE="getpagecontent" onClick="getPage(
'http://www.someurl.com' );">
</FORM>
</BODY>
</HTML>