Side navigation
Ticket #5861: html used.txt
File html used.txt, 7.6 KB (added by dvbreddy, January 19, 2010 05:20AM UTC)
HTML used
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title>
<script src="../scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<link href="/Tutorial/WebResource.axd?d=J1_UOLt8PmnBgxpUNfrRnJYZiSEdmw8TZtqdnKaf1GkddcsCesmQ6ieqceeptAyqCJnIcdw3io2Bdvg3o411dQ2&t=633899302740000000" type="text/css" rel="stylesheet" /></head>
<body>
<form name="form1" method="post" action="ExampleTabs.aspx" id="form1">
<div>
<input type="hidden" name="TabContainer1_ClientState" id="TabContainer1_ClientState" value="{"ActiveTabIndex":0,"TabState":[true,true,true]}" />
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJOTI4NjI0MjEwZBgCBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUNVGFiQ29udGFpbmVyMQUNVGFiQ29udGFpbmVyMQ8PZGZkh96l3YI66tjxqxwDOxbJ3AfPAGrZH0UFm5CrypEKDR0=" />
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<script src="/Tutorial/WebResource.axd?d=OuWpq1Fwvf-f4DVsk716WQ2&t=633916786630625000" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=gh3naeQSCysETbRwNvstiaMwL1az8phFJstPHgHsEtr4qwwlkrp3_5H6aOrjG8RHPXaUGBuZ_3Tzz99bc1DSRkh0jcaz_1f_cJdjrUiZUww1&t=fffffffff01e0309" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>
<script src="/Tutorial/ScriptResource.axd?d=gh3naeQSCysETbRwNvstiaMwL1az8phFJstPHgHsEtr4qwwlkrp3_5H6aOrjG8RHIa6HvcSxFwsuoiw85b06C3qINZbjzSYddTDZ5LMSPvqCwfr0jv1yNHTaD1FhVRbH0&t=fffffffff01e0309" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=JnC8Vru5TeImegUCYRzxpIFrGcYU05-uAQehubj2E54TgIJXx5EHuH66dXZwXmSMqzi5JQtYdX1E_0H8SyFUZQ2&t=ffffffffd2a9b7c7" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=JnC8Vru5TeImegUCYRzxpIFrGcYU05-uAQehubj2E579UgNm7VHHTsjG0KZUTQ5fY4ZZ0d51Xri7nekYEXtietidLGMsuSf0HHCBy59Zd0s1&t=ffffffffd2a9b7c7" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=JnC8Vru5TeImegUCYRzxpIFrGcYU05-uAQehubj2E55T7vl4uIPUa8Ntu-QEfzUHYbQfLCYpxm8aF6gNbdwyIA2&t=ffffffffd2a9b7c7" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=JnC8Vru5TeImegUCYRzxpIFrGcYU05-uAQehubj2E54NpghbIWyFSI6k57gADArdwjx6eyni2p2KOpRr_2xvpJM1rcKrDk20pD-nP2yR2UMpWm5CjxeTx_DeDDaosMtE0&t=ffffffffd2a9b7c7" type="text/javascript"></script>
<div>
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', 'form1', [], [], [], 90);
//]]>
</script>
<input type="button" id="btnAddHandler" value="One" onclick="return btnAddHandler_onclick()" /><br />
<input type="button" id="btnHandlerActivated" value="Two" /><br />
<input type="hidden" id="hdnCurrentTabIndex" value="0" />
<div class="ajax__tab_xp" id="TabContainer1" style="visibility:hidden;">
<div id="TabContainer1_header">
<span id="TabContainer1_TabPanel1_tab"><span class="ajax__tab_outer"><span class="ajax__tab_inner"><span class="ajax__tab_tab" id="__tab_TabContainer1_TabPanel1">
One</span></span></span></span><span id="TabContainer1_TabPanel2_tab"><span class="ajax__tab_outer"><span class="ajax__tab_inner"><span class="ajax__tab_tab" id="__tab_TabContainer1_TabPanel2">
Two</span></span></span></span><span id="TabContainer1_TabPanel3_tab"><span class="ajax__tab_outer"><span class="ajax__tab_inner"><span class="ajax__tab_tab" id="__tab_TabContainer1_TabPanel3">
Three</span></span></span></span>
</div><div id="TabContainer1_body">
<div id="TabContainer1_TabPanel1" class="ajax__tab_panel">
<input type="text" id="txtName" value="Vijay" />
<br />
<input type="button" id="btnOne" value="One" />
<input type="button" id="btnResetOne" value="Reset" onclick="return btnResetOne_onclick()" />
</div><div id="TabContainer1_TabPanel2" class="ajax__tab_panel" style="display:none;visibility:hidden;">
<input type="button" id="btnTwo" value="Two" />
</div><div id="TabContainer1_TabPanel3" class="ajax__tab_panel" style="display:none;visibility:hidden;">
<input type="button" id="btnThree" value="Three" />
</div>
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabPanel, {"headerTab":$get("__tab_TabContainer1_TabPanel1"),"ownerID":"TabContainer1"}, null, {"owner":"TabContainer1"}, $get("TabContainer1_TabPanel1"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabPanel, {"headerTab":$get("__tab_TabContainer1_TabPanel2"),"ownerID":"TabContainer1"}, null, {"owner":"TabContainer1"}, $get("TabContainer1_TabPanel2"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabPanel, {"headerTab":$get("__tab_TabContainer1_TabPanel3"),"ownerID":"TabContainer1"}, null, {"owner":"TabContainer1"}, $get("TabContainer1_TabPanel3"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabContainer, {"activeTabIndex":0,"clientStateField":$get("TabContainer1_ClientState")}, {"activeTabChanged":clientActiveTabChanged}, null, $get("TabContainer1"));
});
//]]>
</script>
</form>
</body>
</html>
<script type="text/javascript">
var isTabIndexReset = false;
var isContentChanged = true;
var cancelChanges = false;
var content = $('form').serialize();//$get('txtName').value;
var currentTabIndex = 0;
var newTabIndex = 1;
var confirmMessage = 'You have made some changes to the content in this tab. \nClick "OK" to reset values and go to other tab.\nClick "Cancel" to continue working in this tab.';
function clientActiveTabChanged(sender, e) {
var tabs = $find('TabContainer1');
if (cancelChanges==false) {
isContentChanged = contentChanged();
if (isContentChanged == true) {
if (isTabIndexReset == false) {
isTabIndexReset = true;
tabs.set_activeTabIndex(currentTabIndex);
}
else {
var c = confirm(confirmMessage);
if (c) {
cancelChanges = true;
resetValues();
tabs.set_activeTabIndex(newTabIndex);
}
}
}
}
isTabIndexReset = false;
cancelChanges = false;
}
function contentChanged() {
var contentNow = $('form').serialize();
return content != contentNow; //txtName != $get('txtName').value;
}
function resetValues() {
$get('txtName').value = txtName;
}
function btnResetOne_onclick() {
resetValues();
}
</script>
Download in other formats:
Original Format
File html used.txt, 7.6 KB (added by dvbreddy, January 19, 2010 05:20AM UTC)
HTML used
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title>
<script src="../scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<link href="/Tutorial/WebResource.axd?d=J1_UOLt8PmnBgxpUNfrRnJYZiSEdmw8TZtqdnKaf1GkddcsCesmQ6ieqceeptAyqCJnIcdw3io2Bdvg3o411dQ2&t=633899302740000000" type="text/css" rel="stylesheet" /></head>
<body>
<form name="form1" method="post" action="ExampleTabs.aspx" id="form1">
<div>
<input type="hidden" name="TabContainer1_ClientState" id="TabContainer1_ClientState" value="{"ActiveTabIndex":0,"TabState":[true,true,true]}" />
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJOTI4NjI0MjEwZBgCBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUNVGFiQ29udGFpbmVyMQUNVGFiQ29udGFpbmVyMQ8PZGZkh96l3YI66tjxqxwDOxbJ3AfPAGrZH0UFm5CrypEKDR0=" />
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<script src="/Tutorial/WebResource.axd?d=OuWpq1Fwvf-f4DVsk716WQ2&t=633916786630625000" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=gh3naeQSCysETbRwNvstiaMwL1az8phFJstPHgHsEtr4qwwlkrp3_5H6aOrjG8RHPXaUGBuZ_3Tzz99bc1DSRkh0jcaz_1f_cJdjrUiZUww1&t=fffffffff01e0309" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>
<script src="/Tutorial/ScriptResource.axd?d=gh3naeQSCysETbRwNvstiaMwL1az8phFJstPHgHsEtr4qwwlkrp3_5H6aOrjG8RHIa6HvcSxFwsuoiw85b06C3qINZbjzSYddTDZ5LMSPvqCwfr0jv1yNHTaD1FhVRbH0&t=fffffffff01e0309" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=JnC8Vru5TeImegUCYRzxpIFrGcYU05-uAQehubj2E54TgIJXx5EHuH66dXZwXmSMqzi5JQtYdX1E_0H8SyFUZQ2&t=ffffffffd2a9b7c7" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=JnC8Vru5TeImegUCYRzxpIFrGcYU05-uAQehubj2E579UgNm7VHHTsjG0KZUTQ5fY4ZZ0d51Xri7nekYEXtietidLGMsuSf0HHCBy59Zd0s1&t=ffffffffd2a9b7c7" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=JnC8Vru5TeImegUCYRzxpIFrGcYU05-uAQehubj2E55T7vl4uIPUa8Ntu-QEfzUHYbQfLCYpxm8aF6gNbdwyIA2&t=ffffffffd2a9b7c7" type="text/javascript"></script>
<script src="/Tutorial/ScriptResource.axd?d=JnC8Vru5TeImegUCYRzxpIFrGcYU05-uAQehubj2E54NpghbIWyFSI6k57gADArdwjx6eyni2p2KOpRr_2xvpJM1rcKrDk20pD-nP2yR2UMpWm5CjxeTx_DeDDaosMtE0&t=ffffffffd2a9b7c7" type="text/javascript"></script>
<div>
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', 'form1', [], [], [], 90);
//]]>
</script>
<input type="button" id="btnAddHandler" value="One" onclick="return btnAddHandler_onclick()" /><br />
<input type="button" id="btnHandlerActivated" value="Two" /><br />
<input type="hidden" id="hdnCurrentTabIndex" value="0" />
<div class="ajax__tab_xp" id="TabContainer1" style="visibility:hidden;">
<div id="TabContainer1_header">
<span id="TabContainer1_TabPanel1_tab"><span class="ajax__tab_outer"><span class="ajax__tab_inner"><span class="ajax__tab_tab" id="__tab_TabContainer1_TabPanel1">
One</span></span></span></span><span id="TabContainer1_TabPanel2_tab"><span class="ajax__tab_outer"><span class="ajax__tab_inner"><span class="ajax__tab_tab" id="__tab_TabContainer1_TabPanel2">
Two</span></span></span></span><span id="TabContainer1_TabPanel3_tab"><span class="ajax__tab_outer"><span class="ajax__tab_inner"><span class="ajax__tab_tab" id="__tab_TabContainer1_TabPanel3">
Three</span></span></span></span>
</div><div id="TabContainer1_body">
<div id="TabContainer1_TabPanel1" class="ajax__tab_panel">
<input type="text" id="txtName" value="Vijay" />
<br />
<input type="button" id="btnOne" value="One" />
<input type="button" id="btnResetOne" value="Reset" onclick="return btnResetOne_onclick()" />
</div><div id="TabContainer1_TabPanel2" class="ajax__tab_panel" style="display:none;visibility:hidden;">
<input type="button" id="btnTwo" value="Two" />
</div><div id="TabContainer1_TabPanel3" class="ajax__tab_panel" style="display:none;visibility:hidden;">
<input type="button" id="btnThree" value="Three" />
</div>
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabPanel, {"headerTab":$get("__tab_TabContainer1_TabPanel1"),"ownerID":"TabContainer1"}, null, {"owner":"TabContainer1"}, $get("TabContainer1_TabPanel1"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabPanel, {"headerTab":$get("__tab_TabContainer1_TabPanel2"),"ownerID":"TabContainer1"}, null, {"owner":"TabContainer1"}, $get("TabContainer1_TabPanel2"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabPanel, {"headerTab":$get("__tab_TabContainer1_TabPanel3"),"ownerID":"TabContainer1"}, null, {"owner":"TabContainer1"}, $get("TabContainer1_TabPanel3"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabContainer, {"activeTabIndex":0,"clientStateField":$get("TabContainer1_ClientState")}, {"activeTabChanged":clientActiveTabChanged}, null, $get("TabContainer1"));
});
//]]>
</script>
</form>
</body>
</html>
<script type="text/javascript">
var isTabIndexReset = false;
var isContentChanged = true;
var cancelChanges = false;
var content = $('form').serialize();//$get('txtName').value;
var currentTabIndex = 0;
var newTabIndex = 1;
var confirmMessage = 'You have made some changes to the content in this tab. \nClick "OK" to reset values and go to other tab.\nClick "Cancel" to continue working in this tab.';
function clientActiveTabChanged(sender, e) {
var tabs = $find('TabContainer1');
if (cancelChanges==false) {
isContentChanged = contentChanged();
if (isContentChanged == true) {
if (isTabIndexReset == false) {
isTabIndexReset = true;
tabs.set_activeTabIndex(currentTabIndex);
}
else {
var c = confirm(confirmMessage);
if (c) {
cancelChanges = true;
resetValues();
tabs.set_activeTabIndex(newTabIndex);
}
}
}
}
isTabIndexReset = false;
cancelChanges = false;
}
function contentChanged() {
var contentNow = $('form').serialize();
return content != contentNow; //txtName != $get('txtName').value;
}
function resetValues() {
$get('txtName').value = txtName;
}
function btnResetOne_onclick() {
resetValues();
}
</script>