SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    parsing the contents from other webpages

    Hi everyone,

    I am doing a research on a project for my website. there is a web page which runs on a server other then my own server and i want to get some(not all) of the contents of that page and show it on my own page.Is there a way to do it with asp or asp.net????

    rEgArDs,

    star_wars

  2. #2
    SitePoint Zealot csi95's Avatar
    Join Date
    Jan 2005
    Location
    Albany, NY
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Join the EasyImage Affiliate Program!
    30% commission on all sales
    Conversion rates as high as 20%
    Dedicated Affiliate Manager to help you succeed!

  3. #3
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by csi95
    thanx,
    i am going to look at it. i didnt know if it was possible.

    regards

  4. #4
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by csi95
    hi
    I have tried to get some variable through xmlhttp object but i get the following error :S

    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


    --------------------------------------------------------------------------------

    A name was started with an invalid character. Error processing resource 'http://127.0.0.1/test/test4.asp'. Line 48, Positi...

    else if (document.all&&document.readyState=="complete")
    ----------------------^

    and the code is:


    <html>
    <head>
    </head>
    <body>
    <%

    Response.ContentType = "text/xml"

    dim objXMLHTTP

    set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")



    objXMLHTTP.Open "GET", "http://127.0.0.1/test/test6.html?class=Template34TableTT", false

    objXMLHTTP.SetRequestHeader "Content-type", "text/xml"

    objXMLHTTP.Send



    Response.Write objXMLHTTP.ResponseText

    %>


    <%

    if Request.ServerVariables("HTTP_METHOD") = "GET" then

    end if
    %>
    </body>


    </html>

  5. #5
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you get that same error if you load
    http://127.0.0.1/test/test6.html?cla...plate34TableTT
    directly in your browser?

    Try changing
    Response.Write objXMLHTTP.ResponseText
    To
    Response.Write "<textarea>" & objXMLHTTP.ResponseText & "</textarea>"
    see if that throws an error

    Also you don't need
    objXMLHTTP.SetRequestHeader "Content-type", "text/xml"
    But I doubt it's doing anything bad - try removing it though.

  6. #6
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jimfraser
    Do you get that same error if you load
    http://127.0.0.1/test/test6.html?cla...plate34TableTT
    directly in your browser?

    Try changing
    Response.Write objXMLHTTP.ResponseText
    To
    Response.Write "<textarea>" & objXMLHTTP.ResponseText & "</textarea>"
    see if that throws an error

    Also you don't need
    objXMLHTTP.SetRequestHeader "Content-type", "text/xml"
    But I doubt it's doing anything bad - try removing it though.
    hello,

    thanx alot it did help but i get now another error:

    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


    --------------------------------------------------------------------------------

    A name was started with an invalid character. Error processing resource 'http://127.0.0.1/test/test4.asp'. Line 49, Positi...

    else if (document.all&&document.readyState=="complete")
    ----------------------^

    and this the area where this error is given:

    else if (document.all&&document.readyState=="complete")
    {
    document.all.LayerTT.innerHTML=text
    document.all.LayerTT.style.pixelLeft=event.clientX+document.body.scrollLeft+offsetx
    document.all.LayerTT.style.pixelTop=event.clientY+document.body.scrollTop+offsety
    document.all.LayerTT.style.visibility="visible"
    }
    else if (document.layers)
    {
    document.LayerTT.document.nstip.document.write('<b>'+text+'</b>')
    document.LayerTT.document.nstip.document.close()
    document.LayerTT.document.nstip.left=0
    currentscroll=setInterval("scrolltip()",100)
    document.LayerTT.left=e.pageX+offsetx
    document.LayerTT.top=e.pageY+offsety
    document.LayerTT.visibility="show"
    }
    }
    i cant imagine whats going wrong
    with regards

  7. #7


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •