• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 425
  • Last Modified:

Load URL contents into a variable

I am looking for a way in javascript/jquery to load the contents of a URL into a variable.
  • 2
1 Solution
Gurvinder Pal SinghCommented:
use load() method to get the content of a URL into a div, and then you can take it from that div

also check get() method's success event
Blowfelt82Author Commented:
Ok this looks promising, as far as you know would this work for external websites outside of my own domain?
Gurvinder Pal SinghCommented:
Nope, only for the same domain....for external domain, you need to get the content from your server side script
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now