How to Load Urls div Control using JQuery.


i am write the code how to Load Url in a Div control using JQuery.When i Click Button Control load the url to div control # symbol identifying to the JQuery script when i click command button new div load the mention aspx file loaded sucessfully.

i am write the code how to Load Url in a Div control using JQuery.When i Click Button Control load the url to div control # symbol identifying to the JQuery script when i click command button new div load the mention aspx file loaded sucessfully.


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script language ="javascript" src="script/jquery-1.2.6.min.js"></script>
<script language ="javascript" src="script/jquery-latest.js"></script>
</head>
<body>
<script>
$(document).ready(function() {
$('#HomeUrl').click(function() {
$('#MyDiv').load('Home.aspx');
return false;
});

$('#AboutusUrl').click(function() {
$('#MyDiv').load('Aboutus.aspx');
return false;
});
});

</script>
<form id="form1" runat="server">
<asp:Button ID="HomeUrl" runat ="server" Text="Home" />
<asp:Button ID="AboutusUrl" runat ="server" Text="About us" />
<div id="MyDiv">
</div>

</form>
</body>
</html>


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: