471,854 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,854 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 2451
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
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
Aug 26 '08 #3
971 Expert 512MB
Moving to JavaScript Forum
Aug 27 '08 #4
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
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by

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.