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 currently writing an app that posts some data to a HTML form and
I am aware that I can Google HTML Form Validation and would get a
I'm writing a Windows Form app that uses an API (the smartFOCUS API, to
I have an HTML form with inputs that will only do client-side processing in
I have a contact form that I'm writing using jQuery and PHP. Below is
I have an html-form with a field that will take a url pointing to
I have been writing a html interface for displaying tables, pie charts, data etc.
I have an issue about writing HTML file with PHP. I have this function
I am writing an HTML program that will be accessed by over 500 people
Writing documentation in html requires some code examples. What to do with characters that

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.