venky n

venky n

  • NA
  • 110
  • 38k

How to use javascript two nested master page in asp.net

Mar 12 2015 9:00 AM
How to use javascript two nested  master page  in asp.net

This code is working for normal website ..but two master page nested website not working.



<!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  type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>


    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false"></script>





<script type="text/javascript">

    $(document).ready(function () {
        var gmarkers = [];
        var map;

        function initialize() {

            var mapProp = {
                center: new google.maps.LatLng(20.593684, 78.96288), //India Lat and Lon
                zoom: 2,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
        }

        google.maps.event.addDomListener(window, 'load', initialize);
        $("#ddcity").change(function () {
            var city = $("#ddcity").val();
            var geocoder = new google.maps.Geocoder();
            var com = city;

            geocoder.geocode({ 'address': com }, function (results, status) {
                if (status == google.maps.GeocoderStatus.OK) {

                    var x = results[0].geometry.location.lat();
                    var y = results[0].geometry.location.lng();
                    var latlng = new google.maps.LatLng(x, y);

                    var myOptions = {
                        zoom: 8,
                        center: latlng,
                        mapTypeId: google.maps.MapTypeId.ROADMAP
                    };
                    map = new google.maps.Map(document.getElementById("googleMap"), myOptions);
                    var marker = new google.maps.Marker({
                        position: new google.maps.LatLng(x, y),
                        map: map,
                        title: com
                    });

                    var infowindow = new google.maps.InfoWindow({
                        content: com
                    });
                    infowindow.open(map, marker);
                    google.maps.event.addDomListener(window, 'load');
                } else {
                    res.innerHTML = "Enter correct Details: " + status;
                }
            });
        });
    });
</script>


</head>


<body>

    <div>
        <table>
            <tr>
                <td colspan="2">Search Place In Google Map
                </td>
            </tr>
            <tr>
                <td>
                    <select id="ddcity">
                        <option value="Chennai">Chennai</option>
                        <option value="arni">arni</option>
                        <option value="Vellore">vellore</option>
                        <option value="thiruvannamalai">Thiruvannamalai</option>
                        <option value="Kanchipuram">Kanchipuram</option>
                    </select>
                </td>
            </tr>
        </table>
    </div>
    <div id="googleMap" style="height: 500px; width: 500px">
    </div>
</html>





Answers (1)