Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 8th, 2005, 07:53 PM
Registered User
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can anyone help me PLEASE!!!!!!

I'm new at asp programming and i need your help.

what I want to make actually is to take the content of an HTML page
which contains URLs and description and put it in a database. To insert the data to an database, i know how to do it, but i don't know
how to exctact the data form a HTML page, specially the URLs which i
want to keep it as LINKs in the datadase and not string.

Can anyone point me to that deriction??

            THANKS!!!!

 
Old March 10th, 2005, 10:28 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii eutuxia55!!
Offcourse :)
If you want to retrieve the url of links then you can get it,
For extracting description you need to do extra effort Let i Give an example


<a href="a1.html">Description of link a1</a><br>
<a href="a2.html">Description of link a2</a><br>
<a href="a3.html">Description of link a3</a><br>
<a href="a4.html">Description of link a4</a><br>
<a href="a5.html">Description of link a5</a><br>
<a href="a6.html">Description of link a6</a><br>
<a href="a7.html">Description of link a7</a><br>
<a href="a8.html">Description of link a8</a><br>
<a href="a9.html">Description of link a9</a><br>
<a href="a10.html">Description of link a10</a><br>

<script>

function getValues()
{

objArray=document.getElementsByTagName('a')
for(i=0;i<=objArray.length;i++)
 {
 alert("link is="+objArray[0].href) //link
 alert("Description is="+objArray[0].innerHTML) //descriiption
 }

}
getValues();
</script>

Now you must put these values using your own separator so that you can split on other page and save it to the database
Hope this will help you


Cheers :)

vinod









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.