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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:53:19+00:00 2026-06-13T10:53:19+00:00

i am using HTML5 and indexOf gives me an error, so what else can

  • 0

i am using HTML5 and indexOf gives me an error, so what else can i use to search for the word “correct” in a string: a001_new_quiz_multiple_choice_new_mc4_correct.html which is in a variable called value1

function SetAPIValue(key1, value1)
{
   // alert("action is " + key1 + " and data is " + value1);
   console.log(value1);

   var str = "wrong";
   var n = str.search(value1);
   if (n > 0)
     alert("found");
}

the error i get: 0x800a01b6 – Microsoft JScript runtime error: Object doesn’t support property or method ‘indexOf’

  • 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-06-13T10:53:20+00:00Added an answer on June 13, 2026 at 10:53 am

    I don’t know how you used indexOf, but this works :

    var value1 = "a001_new_quiz_multiple_choice_new_mc4_correct.html";
    var n = value1.indexOf("correct");
    if (n >= 0) alert("found");   
    

    Maybe you tried "correct".indexOf(value1); instead of value1.indexOf("correct"); ?

    demonstration

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

Sidebar

Related Questions

Hello I am using indexOf method to search if a string is present inside
I am using HTML5,Jquery(v1.6.4) and Jquery-mobile(jquery.mobile-1.0.1.js). I want to populate data dynamically using Jquery.
I am using html5 and css3 in my site project. My css .featured-posts{ display:
I'm experimenting with using html5 and css counters to number the figures in a
I am looking at using HTML5 Canvas element for my upcoming project. I want
I am using html5 data attributes to store data like target dom and initialize
I am using HTML5 Boilerplate and don't find any reset style. All H1 elements
I'm using HTML5's Server Sent Events to push updates to my online clients. Everything
I am making a game engine using HTML5 canvas, and I have decided to
I'd like to start using HTML5's basic features, but at the same time, keep

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.