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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:53:19+00:00 2026-05-26T10:53:19+00:00

I write light wyswig(iframe). I have function who counted length in iframe when event

  • 0

I write light wyswig(iframe). I have function who counted length in iframe when event keyup and change in box(for characters left) number of symbols. But in Opera 9.24 when i change innerHTML box browser drop me to top of html page.

//this.doc - iframe document
            $(this.doc).keydown(function(e)
            {
                if (e.ctrlKey || e.metaKey) isCtrl = true;

                if (e.keyCode == 9) { this.execCommand('indent', false); return false; }
                if (e.keyCode == 66 && isCtrl) { this.execCommand('bold', 'bold'); return false; }`enter code here`
                if (e.keyCode == 73 && isCtrl) { this.execCommand('italic', 'italic'); return false; }                              
            }.bind2(this)).keyup(function(e)
            {                                   
                isCtrl = false;     

                if (e.keyCode == 13)
                {                   
                    return true;
                }                                                           
                if(this.opts.maxlength)
                    this.checkLength();                             
                if(this.opts.autoSync)
                    this.syncCode();                                            
            }.bind2(this));


        checkLength: function() {
            var html = this.getHtml();

            if (html.length >= this.opts.maxlength) {
                html = html.substr(0, this.opts.maxlength );                
                this.setHtml(html);             
                alert('Комментарий должен содержать до ' + this.opts.maxlength);
            } else {                                
                var number = this.opts.maxlength - html.length;
//li_counter - box for characters left
                    this.li_counter.html("Осталось символов: " + number);               
            }
    // bind2
    Function.prototype.bind2 = function(object)
    {
        var method = this; var oldArguments = $.makeArray(arguments).slice(1);
        return function (argument)
        {
            if (argument == new Object) { method = null; oldArguments = null; }
            else if (method == null) throw "Attempt to invoke destructed method reference.";
            else { var newArguments = $.makeArray(arguments); return method.apply(object, oldArguments.concat(newArguments)); }
        };
    };  

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

    Are you sure this.doc is the IFRAME document and not for some reason the parent document? Where is this.doc set?

    BTW Opera 9.24 is quite old by now, and should not have many users. Is there any specific reason why you need to test on this outdated version?

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

Sidebar

Related Questions

I have planned to write my own light weight MVC for PHP, that will
You write a function and, looking at the resulting assembly, you see it can
Im trying to write a recursive function which returns the factorial of a number.
I have a Windows form App which write to log files using log4net. The
I created a BeginInvoke so I could write to a text box from a
I have a Galaxy Tab 1000. I am trying to write a code, that
Some items don't have write access right due to workflow state write not being
I need to write a python webservice, but I would rather use a LIGHT
So basically I want to write a function that can be written like this:
I have a piece of C code where I try to write a buffer

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.