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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:49:31+00:00 2026-05-22T16:49:31+00:00

I have two frames, the expression running in first frame and calling highlightElements function

  • 0

I have two frames, the expression running in first frame and calling highlightElements function in another frame. This expression works fine in Firefox:

parent.frames[0].highlightElements(lineNumbers, stringObj);

The highlightElements function (just for sure):

function highlightElements(lineNumbers, stringObj) {
  // run through the cycle and highlight them
  //for (var ln in lineNumbers) {
  var length = lineNumbers.length;
  for (var ln=0; ln<length; ln++) {
    var elements = $('.no');
    //for (var i in elements) {
    var el_length = elements.length;
    for (var i=0; i<el_length; i++) {
      if (parseInt(elements[i].innerHTML) == lineNumbers[ln]) {
        var badThing = "yes";
        for (var nextElement = elements[i].next();
             nextElement.className != '.no'; nextElement = elements[i].next()) {
          if (nextElement.innerHTML == stringObj) {
            badThing = "no";
            nextElement.effect('highlight', {}, 'slow');
            scrollIntoView(nextElement);
          }
        }
        if (badThing == "yes") alert("Didn't find the object");
      }
    }
  }
}

But in Chrome it produces the error “Uncaught TypeError: Property ‘highlightElement’ of object[objectDOMWindow] is not a function”.

How to change the expression to make it runnable in Chrome? Thanks

  • 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-22T16:49:32+00:00Added an answer on May 22, 2026 at 4:49 pm

    Make sure both frames are under same domain and protocol. Chome blocks javascript access from frames to another if the domains/protocols don’t match. If you are working locally, and not under a local domain (i.e. the url is something like file:///C:/etc/etc.html) then it won’t work either.

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

Sidebar

Related Questions

We have some web pages which have two frames, with one frame in the
In a frame I have two columns. In the first column I display some
I have a data frame with two columns. First column contains categories such as
I have two data.frames. For examples sake let's say they look like this: df1
I have the following two frames frame 1 with name=top and frame 2 with
I have two frames and want to access an element in one frame from
i have two frames , how can i put one frame in the other
I have two frames in a frameset - frame[0] contains a script that loads
I have two frames I need to a load the second frame based on
I have two frames in my page. The upper frame is a jsp which

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.