Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 279813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:03:52+00:00 2026-05-12T05:03:52+00:00

I am writing an HTML form that uses a google map, but to reduce

  • 0

I am writing an HTML form that uses a google map, but to reduce the ammount of clutter on the screen I have removed the google interface and replaced it with some simple submit buttons to change the map type (eg Satellite, Hybrid and Normal). The problem that I am having is that IE refuses to accept the: map.setMapType(G_SATELLITE_MAP);

What is confusing me though, is the fact that my application works beautifally in Safari and FF, yet refuses to work at all in IE8.

Just for reference here is the function I am calling:

function map_type_sat()
{
    map.setMapType(G_SATELLITE_MAP);
    return true;
}

and here is how I am calling it:

<form action ="#" onsubmit="return map_type_sat()">
<input type="Submit"  value="satellite"> 
</form>

can anyone see any issues that would be causing it to not work, or is it an issue with my version of IE having a required plugin to run this command.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:03:52+00:00Added an answer on May 12, 2026 at 5:03 am

    I’m not sure why you are using a form submission to set the map type. This may, in fact, be handled differently in IE, potentially causing a full post back even with the ‘#’ target action. Try changing it to use a click handler for a regular input button and omit the form. Note that this also eliminates the need to return a value from the function.

    function map_type_sat()
    {
        map.setMapType(G_SATELLITE_MAP);
    }
    
    <input type='button' value='satellite' onclick='map_type_sat()' />
    

    Or, even better,

    function set_map_type( type )
    {
        map.setMapType( type );
    }
    
    <input type='button' value='normal' onclick='set_map_type(G_NORMAL_MAP);' />
    <input type='button' value='satellite' onclick='set_map_type(G_SATELLITE_MAP);' />
    <input type='button' value='hybrid' onclick='set_map_type(G_HYBRID_MAP);' />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a Chrome extension that works with a website that uses ISO-8859-1. Just
I am developing a HTML form designer that needs to generate static HTML and
I'm writing a Winforms application and I've been writing these awful HTML reports where
Let's face it: writing proper, standards compliant HTML is quite difficult to do. Writing
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the
I am looking for a form class that: Is standalone/doesnt need a framework to
I am writing a page which uses a lot of in situ editing and
I'd like a select box to appear on a form that I'm building, and
Writing some test scripts in IronPython, I want to verify whether a window is
Writing the code for the user authentication portion of a web site (including account

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.