469,315 Members | 1,532 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

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 2409
Dormilich
8,651 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

Post your reply

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

Similar topics

34 posts views Thread by Michael Foord | last post: by
3 posts views Thread by micchy | last post: by
5 posts views Thread by Pete Wason | last post: by
1 post views Thread by Keith | last post: by
2 posts views Thread by sebastiraj | last post: by
13 posts views Thread by sembiance | last post: by
12 posts views Thread by mistral | last post: by
2 posts views Thread by helpmefinda | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.