get html source from a url

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Song Zhang

    get html source from a url

    If I know a URL, say, www.javascript.com, how can I get the html source
    using javascript function/method? Thanks.

    _______________ _______________ _______________ _______________ _____
    High-speed Internet access as low as $29.95/month (depending on the local
    service providers in your area). Click here. https://broadband.msn.com

  • Ivo

    #2
    Re: get html source from a url

    "Song Zhang" <sozst1@hotmail .com> wrote in message
    news:BAY9-F38K38o2omjpD30 0006f89@hotmail .com...[color=blue]
    > If I know a URL, say, www.javascript.com, how can I get the html source
    > using javascript function/method? Thanks.[/color]

    Cross-domain scripting restrictions apply. In other words, javascript cannot
    do it. Browsers are designed to that way, for obvious security reasons.
    Workarounds include serverside script and ActiveX stuff. For more
    information, you can start at www.jibbering.com/faq/#FAQ4_19.
    Ivo.


    Comment

    • VK

      #3
      Re: get html source from a url

      Within your own domain under IE you can use frames with document.domain
      property PROGRAMMICALLY set to the same value in both frames. After that you
      can use innerHTML and textRange objects between frames. But under your own
      domain you have easier ways to accomplish your tasks.

      With cross-domain it's not possible using JavaScript. With server-side
      scripting it's technically not so difficult, but it's called
      "content/traffic stealing", and shame on thieves!


      Song Zhang <sozst1@hotmail .com> wrote in message
      news:BAY9-F38K38o2omjpD30 0006f89@hotmail .com...[color=blue]
      > If I know a URL, say, www.javascript.com, how can I get the html source
      > using javascript function/method? Thanks.
      >
      > _______________ _______________ _______________ _______________ _____
      > High-speed Internet access as low as $29.95/month (depending on the local
      > service providers in your area). Click here. https://broadband.msn.com
      >[/color]


      Comment

      Working...