Posts Tagged Br
Autoscroll with PHP
Posted by in PHP code on October 16th, 2009
Here’s the code for auto scroll with php:
<style>
.scrollbar {
height: 70px;
overflow: auto;
width:100px;
}
</style>
<div class=scrollbar>
money <br />
stock<br />
finance<br />
option<br />
forex<br />
currency<br />
loan<br />
.scrollbar {
height: 70px;
overflow: auto;
width:100px;
}
</style>
<div class=scrollbar>
money <br />
stock<br />
finance<br />
option<br />
forex<br />
currency<br />
loan<br />
jQuery reload page
Posted by in Jquery on July 18th, 2009
When you load a page using require PHP function, there is time when you want to reload the page in require PHP function again. You can do this by using the require in a div. Then load the page again using jQuery load function.
Here’s the code in the main page:
<html>
<head>
<script type=”text/javascript” src=”jquery.js”></script>
<script type=”text/javascript”>
function reload()
{
$(“#page”).load(“page.php?value=test”);
}
</script>
</head>
<body>
<div id=”page”>
<?php
require(“page.php”);
?></div>
<br>
<input type=button value=”Click to reload page.php” onclick=”reload();”>
</body>
</html>
<head>
<script type=”text/javascript” src=”jquery.js”></script>
<script type=”text/javascript”>
function reload()
{
$(“#page”).load(“page.php?value=test”);
}
</script>
</head>
<body>
<div id=”page”>
<?php
require(“page.php”);
?></div>
<br>
<input type=button value=”Click to reload page.php” onclick=”reload();”>
</body>
</html>
And the function in page.php:
<?php
echo “Test value = ” . $_GET['value'];
?>
echo “Test value = ” . $_GET['value'];
?>









