Showing posts with label mouse. Show all posts
Showing posts with label mouse. Show all posts

Wednesday, October 4, 2017

Store data in mysql for all the languages to use character set

 Store data in mysql for all the languages to use character set


HTML HEAD TAG



MYSQL DATABASE CONNECTION

mysql_query('SET character_set_results=utf8');
mysql_query('SET names=utf8');
mysql_query('SET character_set_client=utf8');
mysql_query('SET character_set_connection=utf8');
mysql_query('SET character_set_results=utf8');
mysql_query('SET collation_connection=utf8_general_ci');

Thursday, July 14, 2011

Div Scrollable Contents on MouseOver On Javascript




SCROLLABLE DIV CONTENTS WHEN MOUSE OVER THE SCROLL UP AND SCROLL DOWN LINKS
SCROLLABLE DIV CONTENTS WHEN MOUSE OVER THE UP AND DOWN LINKS The top-level function, escape, encodes the string that is contained in the string argument to make it portable. A string is considered portable if it can be transmitted across any network to any computer that supports ASCII characters. We can use escape function in JavaScript to make a string portable to transmit it over a network. All the non ASCII characters are to be converted before sending them by using escape function. The escape function will replace these non ASCII characters to its two or four digit hex format.
Scroll Up Scroll Down

Here Code


<html>
<script type="text/javascript">
var scrolling = null;
var _speed = 12;


function doScrollUp()
{
var d = document.getElementById('scroller');
d.scrollTop = d.scrollTop - _speed;


scrolling = window.setTimeout(function() {
doScrollUp();
}, 100);
}


function doScrollDown()
{
var d = document.getElementById('scroller');
d.scrollTop = d.scrollTop + _speed;


scrolling = window.setTimeout(function() {
doScrollDown();
}, 100);
}


function doStopScroll()
{
window.clearTimeout(scrolling);
}
</script>
<body>
<h2>SCROLLABLE DIV CONTENTS WHEN MOUSE OVER THE UP AND DOWN LINKS</h2>
<div id="scroller" style="width:100%; height:100px; overflow:hidden;">


SCROLLABLE DIV CONTENTS WHEN MOUSE OVER THE UP AND DOWN LINKS
<br /><br /><br />
The top-level function, escape, encodes the string that is contained in <br /><br />
the string argument to make it portable. A string is considered portable <br /><br />
if it can be transmitted across any network to any computer that
supports ASCII characters.<br />
We can use escape function in JavaScript to make a string portable
to transmit it over a network. All the non ASCII characters are to be <br />
converted before sending them by using escape function. The escape function <br />
will replace these non ASCII characters to its two or four digit hex format.<br />
<br /><br /><br /><br />
</div>
<div>
<span style="color:red;" onmouseover="doScrollUp();" onmouseout="doStopScroll();" style="padding-right:10px;">Scroll Up</span>
<span style="color:blue;" onmouseover="doScrollDown();" onmouseout="doStopScroll();">Scroll Down</span>
</div>


</body>
</html>

Thursday, December 2, 2010

Disable Right Click On Web Page Using jQuery

This is code used for disable right click


 $(document).ready(function()
  {
         $(document).bind("contextmenu",function(e){
         return false;
        });
 });

This code for disable right click on web pages. It is working all browsers excepted Opera..
try it..
Download add jQuery File . Here it is link http://jquery.com/

Disable Right Click Easily using jquery


<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>jQuery disable right click</title>
<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" language="javascript">

           $(function() {
             $(this).bind("contextmenu", function(e) {
                    e.preventDefault();
             });
   });
</script>
</head>

<body>
        jQuery disable right Click
</body>
</html>