473,385 Members | 1,732 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,385 software developers and data experts.

Get source code of a page from another page

hii evry one

I am having two page (page1.html and page2.html)

Is it possible to get the whole source code of page2.html from page1.html
(throu javascript)

For example:

on click event - I need to fetch whole content of the page2.html

Please suggestion me if its possible
Aug 26 '08 #1
4 2496
Dormilich
8,658 Expert Mod 8TB
I guess, you have to use AJAX.
Expand|Select|Wrap|Line Numbers
  1. // invoke XmlHttpRequest object
  2. XMLhttpRequest.open("POST", "page2.html", true); // this could be the request
  3. // further AJAX code coming here
hope that helps a bit
Aug 26 '08 #2
gits
5,390 Expert Mod 4TB
please post javascript-related questions in the javascript-forum ... hopefully a mod of the HTML-forum will move it there so you will get more responses when you ask in the appropriate forum ...

kind regards
MOD
Aug 26 '08 #3
eWish
971 Expert 512MB
Moving to JavaScript Forum
Aug 27 '08 #4
gits
5,390 Expert Mod 4TB
as Dormilich suggested you may use an AJAX-call for such a purpose. post back with something you have tried and/or in case you have any problems with that issue ...

kind regards
Aug 27 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

34
by: Michael Foord | last post by:
I'd like to formalise slightly the license I release my projects under. At the moment it's 'free to use, modify, distribute and relicense'. This is basically fine as I don't want t oprevent people...
3
by: micchy | last post by:
Dear everyone, I'd like to know if 'view-source' in javascript can work without reloading the page. (or not calling the page again, just as I right-click in IE) Thanks for your help! micchy
5
by: Pete Wason | last post by:
Hiall! I have a demo viewer page for javascript stuff that has three buttons "DEMO" "HTML" and "JSCR", and an IFRAME called 'viewer'. Initially, the IFRAME gets loaded with the actual demo...
1
by: Keith | last post by:
Is there a way of processing an ASP page and placing the resulting HTML source code into a TEXTAREA on another page? I have a page that will be generated dynamically from database content....
2
by: sebastiraj | last post by:
I have one JSP program in which one iframe is defined. And the source of which is an another jsp. Contents of an iframe is in hyperlink. When i click any of the hyperlinks one popup box will come....
13
by: sembiance | last post by:
Hi folks :) I've been working on a C/C++ Source Code search engine website for over a year now, and just thought I'd let you all know that I just put it live a few minutes ago. It searches 99...
0
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
6
by: jwwishart | last post by:
For some reason I'll view an aspx page and... 1. Scripts that I add (using the RegisterStartupScript method of the Page object) dont show up in the source(IE->View Source)even thought I know...
12
by: mistral | last post by:
Can anybody tell me how to get source code of page in iframe? (popup window is clickable image). When I right click on this popup border to view source, i see just as follows <html> <head>...
2
by: helpmefinda | last post by:
Hello everyone, I am currently writing a web spider, and I have it working for the most part using winINet functions. However, I have found that winINet functions do not get close to retrieving...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...

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.