Posts

Showing posts with the label java script

integrete google route planner in php

Hi friends, Here you can get how to integrate a route planner to your website. You first need a google map key to your website. The  http://maps.google.com/maps?file=api&v=2&key=abcdefg  URL points to the location of the JavaScript file that includes all of the symbols and definitions you need for using the Google Maps API. Your page must contain a  script  tag pointing to this URL, using the key you received when you signed up for the API. In this example the key is shown as " abcdefg ." Loading the Map onload = " initialize () " onunload = " GUnload () " > The  onload  attribute is an example of an event handler. map . addControl ( new  GSmallMapControl ( ) ) ; map . addControl ( new  GMapTypeControl ( ) ) ; map . enableDoubleClickZoom ( ) ; The  enableDoubleClickZoom()  gives the functionality of double click zoom on map .   setDirections ( "Noida" ,  "Agra" ,  "en_US" ) ; The  setDirections...

twitter style update message display script

Hello Friends Here is the script to display confirmation or error message in twitter style.  You just need to write the message in   <div id="alert"> ...............</div> whatever you want . After that add the javascript code written below. <style type="text/css"> body { background-color: #ccc; color: #000; } #alert { overflow: hidden; width: 1260px; text-align: center; position: absolute; top: 0; left: 0; background-color: #fff; height: 0; color: #000; font: 20px/40px arial, sans-serif; opacity: .9; } </style> <div id="alert"> Thank you. Your message has been sent </div> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript"> $(function () { var $alert = $('#alert'); if($alert.length) { var alerttimer = window.setTimeout(function () { ...

How to do autorefresh using javascript

If you want to refresh your page automatically after loading the page <html> < head> < script type="text/JavaScript"> function timedRefresh(timeoutPeriod) { setTimeout("location.reload(true);",timeoutPeriod); } < /script> < /head> < body onload="JavaScript:timedRefresh(5000);"> This page will refresh every 5 seconds. Here we are using the "onload" event to call our function. We are passing in the value '5000', which equals 5 seconds. < /body> < /html > I f you want to refresh a page " on click ", type the following code as:- < a href="javascript:location.reload(true)" > Refresh this page < /a >

How to enable right click on site that is disabled

In Fierfox Got to the menu bar, click on Tool menu and go to the "Option" and click here. Click on "content" . Click on "advanced" button. Uncheck the "Disable or replace context menus". Refresh the page , right click will work. In Internet Explorer   Go to "Internet Options"    Click the "Security" tab Click "Custom Level"   S croll down to the "Scripting" section   Set "Active Scripting" to "disable"   Click "Ok" a couple of times.