• sudheer achanti
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
hi,
i newly joined SFDC.

After successful custome login page, on the immediate VF page i have to set up two radio buttions. seleting first radio buttion (ex : country)  , it should display the contry list ( inda, us, aus, japan) and click on the individual country  should enable the new VF pages( at this new VF page is just empry). similarly selecting the 2nd raido buttion (ex : region), earlier displayed country list should disappear and display new records (asia, middle east, africa, norht america) .again clock on any of these displayedregions should enable the new VF page.

seeking direction on this whether custom Object should be created or not , if Custom obejct is require then next steps on a high level.
appreciate any help in this regard.

thanks,
<apex:page sidebar="false" showheader="false" controller="HotelRemoter">
<head>
<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0; padding: 0 }
  #map-canvas { height: 100% }
</style>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
var map;
function initialize() {
    var mapOptions = {
        center: new google.maps.LatLng(37.784173, -122.401557),
        zoom: 15
    };
    map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
function loadHotels() {
    Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.HotelRemoter.findAll}',
        function(result, event){
            if (event.status) {
                for (var i=0; i<result.length; i++) {
                    var id = result[i].Id;
                    var name = result[i].Name;
                    var lat = result[i].Location__Latitude__s;
                    var lng = result[i].Location__Longitude__s;
                    addMarker(id, name, lat, lng);
                }
            } else {
                alert(event.message);
            }
        },
        {escape: true}
    );
}
function addMarker(id, name, lat, lng) {
    var marker = new google.maps.Marker({
            position: new google.maps.LatLng(lat, lng),
            map: map,
            title: name
    });
    google.maps.event.addListener(marker, 'click', function(event) {
        window.top.location = '/' + id;
    });
}
 </script>  
</head>
<body>
  <div id="map-canvas"/>
</body>
</apex:page>