Solved

Load URL contents into a variable

Posted on 2012-03-21
3
413 Views
Last Modified: 2012-04-12
I am looking for a way in javascript/jquery to load the contents of a URL into a variable.
0
Comment
Question by:Blowfelt82
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 37748322
use load() method to get the content of a URL into a div, and then you can take it from that div
http://api.jquery.com/load/

also check get() method's success event
http://api.jquery.com/jQuery.get/
0
 

Author Comment

by:Blowfelt82
ID: 37748363
Ok this looks promising, as far as you know would this work for external websites outside of my own domain?
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 37748477
Nope, only for the same domain....for external domain, you need to get the content from your server side script
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question