tags:

views:

37

answers:

1

Suppose I have following html page.

<html>
<head>
 <link type="text/css" rel="Stylesheet" href="css/some.css" />
</head>
<body>
  <input type="button" value="test" id="btnTest" name="btnTest"/>

<!--Script Section start-->
 <script type="text/javascript" src="js/jquery/jquery-1.4.1.js"></script>
 <script type="text/javascript">
 function someFunction()
 {
   alert("hi");
 }
 </script>
 <!--Script Section end-->

</body>
</html>

and I want above whole page to get loaded in another page without the help of iframe when I click on top menu of that page.

+1  A: 

Hi, this is possible when both pages are on the same server. You should take a look at jQuery's .load() function: http://api.jquery.com/load/

You can also include only some part of the page by using selectors inside load statement, like so

$('#result').load('ajax/test.html div:first');
Viktor Stískala