473,414 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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

Jul 20 '05 #1
2 17027
Ivo
"Song Zhang" <so****@hotmail.com> wrote in message
news:BA*************************@hotmail.com...
If I know a URL, say, www.javascript.com, how can I get the html source
using javascript function/method? Thanks.


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.
Jul 20 '05 #2
VK
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 <so****@hotmail.com> wrote in message
news:BA*************************@hotmail.com...
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

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: asim | last post by:
Hi All i m transforming a simple XSL file on Server side using MSXML Parser ... and writting resultant HTML directly on browser .. is there any way to get this HTML in a variable ??? i seen the...
11
by: Patrick Van Esch | last post by:
Hello, I have the following problem of principle: in writing HTML pages containing ancient greek, there are two possibilities: one is to write the unicode characters directly (encoded as two...
4
by: John Dalberg | last post by:
I have a weird problem. I have a webpage that displays a datagrid with data but when I use IE to view the html representation, the source has no table source for the datagrid. I used Opera, Mozilla...
6
by: John Dalberg | last post by:
Why does IE not show the full html source when I try to view the source?? I mean why does it hide a few features. Previously I had an issue where the data grid html representation was hidden in...
17
by: chris.schwalm | last post by:
I would like to first state that I have searched through the archives and found a lot of related material, but am still new enough to javascript that I can't fit all the pieces together yet. So...
78
by: Robert Baer | last post by:
The homepage i have had up and seemingly working is: http://oil4lessllc.com/ However, the validator has so many complaints, and being so incompetent, i have no clue as to how to fix it all. Would...
0
by: Bogey | last post by:
Hi, I am a complet newby in XML; I just want to create a table for datas coming from XML file <Study StudyNumber="3"> <Sample> <Destination Position="D2"/> <Source SourcePlate="P3"...
3
tpgames
by: tpgames | last post by:
When I renamed the class file to Audiodriver.class and changed the link to Audiodriver.class, the game wouldn't load. I got this error java.lang.NoClassDefFoundError: Audiodriver (wrong name:...
5
by: GuyBowden | last post by:
Hi I'm trying to figure out why a certain server is rendering out strange html Sometimes it renders out html code to the browser window. See here: ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.