1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../../css/base.css" rel="stylesheet" type="text/css" />
<link href="../../css/app.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../js/jquery-1.8.0.min.js"></script>
<title><?php $pagetitle ?></title>
<script type="text/javascript">
$(document).ready(function() {
/* $('form').find(':input[type=submit]').focus(function() {
target = this;
alert("1:"+target);
});*/
$('form').submit(function() {
//alert("2:"+target);
//alert("form submitted "+$(document).scrollTop()+" "+$(this).find("#scrolly").val());
$(this).find("#scrolly").val($(document).scrollTop());
//var val = $("input[type=submit][clicked=true]").val()
});
$('.confirm').click(function() {
var answer = confirm('Are you sure?');
return answer // answer is a boolean
});
<?php
if(isset($_POST['scrolly'])) {
echo '$(document).scrollTop('.$_POST['scrolly'].');';
//echo 'alert("setting scrolly");';
}
?>
});
</script>
</head>
<body>
<div id="wrapper">
<div id="menu">
<?php include "menu.php"; ?>
</div>
<div id="content">
<?php
if (isset($errorMsg) && $errorMsg != "") {
echo "<p class='errorMsg'>".$errorMsg."</p>";
}
if (isset($userMsg) && $userMsg != "") {
echo "<h3>".$userMsg."</h3>";
}
?>
<?php
// DEBUG //////
/*echo "<pre>";
print_r($_POST);
//print_r($_SESSION);
echo "</pre>";*/
///////////////
?>
<?php include $content; ?>
</div>
<div id="footer">
<p>Page footer</p>
<?php
// DEBUG //////
echo "<pre>";
print_r($_POST);
//print_r($_SESSION);
echo "</pre>";
///////////////
?>
</div>
</div>
</body>
</html>
|