Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

obtain text from a given url

Status
Not open for further replies.

robinsoninho

Programmer
Jul 25, 2005
6
GB
hi, is it possible for a html page to be given a url the user then click submit, and then bring back the contents between say the <body> .... </body> of that url and display on that page.

thanks for any help
 
if page 1 is thus

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
Enter Url:
<form name="form1" method="post" action="extract_display.js">
<p>
<input type="text" name="textfield">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
</html>

and page 2

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="form1" method="post" action="">
<textarea name="textarea"></textarea>
</form>
</body>
</html>

in which a javascript is ran over the url and the results are displayed in the text area
 
Where's your Javascript that you need help with? Or do you expect someone here to write that for you?

I'm not sure why you're submitting to a Javascript file, and using the POST method won't allow you to read the form data on the page submitted to.

Lee
 
Your best bet for processing a form is to use server-side scripting, which includes ASP (VBScript, Javascript, Perlscript, or Pythonscript), PHP, ASP.NET, ColdFusion, or Java Server Pages, which ever your server has available.

But you need to write the code yourself, or hire someone to do it for you. This isn't a place to get free programming done.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top