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

  • Home
  • SEARCH
  • 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 5928567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:18:25+00:00 2026-05-22T14:18:25+00:00

Why is that changing a button text doesn’t work in Opera 11.11 for elements

  • 0

Why is that changing a button text doesn’t work in Opera 11.11 for elements like

<input type="submit" value="Asdasd" id="blahblah_button" />

? (Didn’t try it in earlier versions yet.)

I tried it with jQuery and with “pure” JavaScript too, none of them worked.

This is the jQuery code I tried:

$('#blahblah_button').val('Blah-blah');

and this is the “pure” JS-code:

document.getElementById('blahblah_button').value = 'Blah-blah';

Why is that none of them worked in Opera 11.11?
It DOES work in IE, Chrome and FF, it surprises me that it doesn’t work in Opera.

I have to mention that it DOES work for button tags like this in Opera too:

<button id="test_button" onclick="$(this).text('Blahblah');">Some text</button> 

Thanks for your answers in advance!


EDIT I. (0:40)

I forgot to mention that querying the button’s value after the modification gives the result that it seems to work fine, which means it changes the structure in JS DOM, but doesn’t rerender the visible button appropriately.

This is the example code with which you can try this behaviour:

http://jsbin.com/inuxix/1/edit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="hu" xml:lang="hu">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Changing button text</title>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
    </head>
    <body>
        <p>Button tag - WORKING
            <button onclick="$(this).text('Blahblah_1');" id="test_button">Button_text (button_tag)</button>
        </p>
        <p>Input tag (type: submit) - NOT working
            <input onclick="$(this).val('Blahblah_2');" type="submit" value="Submit_text" id="blahblah_submit_type" />
        </p>
        <p>Input tag (type: button) - WORKING
            <input onclick="$(this).val('Blahblah_3');" type="button" value="Button_text" id="blahblah_button_type" />
        </p>
        <p>
            <button onclick="alert($('#blahblah_submit_type').val());" id="val_button">Getting blahblah_submit_type's value</button>
        </p>
    </body>
</html>

EDIT II. (4:41)

But I also have to mention that it DOES work for input elements with “button” type – so I complemented my code above with an element like this. I also marked which types do and which don’t work.


EDIT III.

In the meantime, I tested it, and it doesn’t work in Opera <= 11.11, but this bug has been fixed in Opera 11.50 though.

  • 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-22T14:18:26+00:00Added an answer on May 22, 2026 at 2:18 pm

    This is a bug in Opera. I’m not sure what causes it, but a simple test page that renames the button does not trigger any issues, however on @Darin’s jsfiddle.net example the bug does appear.

    It appears to be a redraw bug. I noticed the width of the button changes to match the new label, but the actual label does not change. Also, shifting away from the page and going back, shows the new label instead of the old one.

    I did a quick google and could not find anyone else who’s come across it.

    Here is a workaround that I found:

    $('#blahblah_button').val('there');
    $('#blahblah_button').get(0).outerHTML = $('#blahblah_button').get(0).outerHTML;
    

    Perhaps someone can find a cleaner workaround, ideally one that’s built into jQuery’s val() method. But the best solution is obviously for Opera to fix the bug. You should send them an email about it.

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

Sidebar

Related Questions

I have an existing XML file that I would like to append without changing
My goal: each time a user selects text, and clicks a button, that text
I am have buttons like this: <button type=button class=img img_button_bla onclick=...>Bla!</button> The img class
<script type=text/javascript> $(function(){ $('button').each(function(i){ $(this).click(function(){ $(this).after('<br /><button type=button>Button</button>'); }); }); }); </script> <button type=button>Button</button>
I am trying to change the value of a set of text boxes (that
Line-height causes gaps between images and other elements but changing its value to 0
I'm trying to prove that changing document.domain can be used only for cross scripting
I've found that after changing the overlays on a MapView , the changes aren't
I have a jquery flexigrid that I'm dynamically changing so that it displays different
I have a JS function - triggered with onclick -, that is dynamically changing

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.