Dear Xelawho,
                    I have tried the full codes from your sides. But I get
this error again document.getElementById('map') is null. I tried to move
this line into my createMap but it still gives me error.
function createMap()
        {

               document.form1.hdnEmployeeID.value='<?php echo $employeeID;
?>';
                employeeID = document.form1.hdnEmployeeID.value;

                document.form1.hdnEnterpriseID.value='<?php echo
$enterpriseID; ?>';
                enterpriseID = document.form1.hdnEnterpriseID.value;

                document.form1.hdnClientList.value='<?php echo $clientList;
?>';
                clientList = document.form1.hdnClientList.value;

               map = new GMap2(document.getElementById("map"));
               geocoder = new GClientGeocoder();
                var topRight = new GControlPosition(G_ANCHOR_TOP_LEFT, new
GSize(10,30));
                map.addControl(new GSmallMapControl(),topRight);
                map.addControl(new GMapTypeControl());
              map.enableScrollWheelZoom();

                mycontrol = new TextualZoomControl();

          map.addControl(mycontrol);

          map.addControl(new FullPageControl());

                map.clearOverlays();

                var lat = 3.8;
                var lng = 102.5;

                map.setCenter(new GLatLng(lat, lng), zoom);



        }
        function search_control() {}
        new search_control();
        search_control.prototype.initialize = function() {
        var contents = document.createElement("div");
        contents.style.width="300px";
        contents.style.height="25px";
        contents.innerHTML="<div id='auto' style='z-index:100'><input
type='text' style='font-family:verdana;width:200px;
height:18px;font-size:12px' id='autocomplete' autocomplete='off'
onKeyPress='return submitenter(this,event)'/><input type=\"button\"
onclick=\"searchLocations()\" value=\"Search\"/><\/div>";
        document.getElementById('map').appendChild(contents);
        return contents;
        }
        new search_control().initialize();

On Wed, Jun 22, 2011 at 10:20 PM, xelawho <[email protected]> wrote:

> But the same thing does not appear in IE. Any
> > solution please?
>
> I'm surprised it works at all. You're not initializing the control OR
> returning the contents of the div.
>
> there are two solutions:
> 1) if you don't care about the functionality if the input box, do as
> Andrew says.
> 2) if you want that functionality, go back to the example that I gave
> and copy the entire section of code correctly.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps API V2" group.
>  To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to