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 317497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:28:53+00:00 2026-05-12T08:28:53+00:00

I developed an HTML page that uses jQuery and Ajax. I had the following

  • 0

I developed an HTML page that uses jQuery and Ajax. I had the following lines in my <head> tag:

<script language="javascript" type="application/javascript" src="script/jquery.js"></script>
<script language="javascript" type="application/javascript">
    function someFunction() {
        some code;
    }
</script>
    ...

  later - down in the body tag:
<a href="javascript:someFunction();">click here</a>

It worked perfectly in FF and Chrome, but threw an “Object Expected” in IE8 as soon as I clicked the link. Even with the Script Debugger on, it would not reach the first line of the function.
I tried switching to IE7 mode, or IE8 Compatability mode – to no avail.

I lucked out and found a question through Google where someone suggested changing the type in the <script> tag to "text/javascript" and now it works in all 3 browsers.

My question is: what did I do wrong? Is "text/javascript" better than "application/javascript", or is there a better (== more correct) solution to my issue?

  • 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-12T08:28:53+00:00Added an answer on May 12, 2026 at 8:28 am

    “text/javascript” is the only type that is supported by all three browsers. However, you don’t actually need to put a type. The type attribute of a script tag will default to “text/javascript” if it is not otherwise specified. How that will affect validation, I’m not sure. But does that really matter anyway?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this tab view that developed base on jQuery: https://d2o0t5hpnwv4c1.cloudfront.net/001_Tabbed/site/jQuery.html# I change the
I'm trying to create a page in ASP Classic that uses the jquery calendar.
I've developed an HTML page that sends information to a Servlet. In the Servlet,
I have developed the android phonegap application using html page and css. But My
I had developed one website purely in HTML .I have my form with fields
We have a mass emailing tool (.net based) that we developed in house. html
In an application I write that uses a large HTML table of numbers the
We have developed a system that uses a single code base, consisting of four
I have developed an ajax application in which the server page is called every
Using this page, http://developer.android.com/sdk/compatibility-library.html , I have installed the Android Support Package, added a

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.