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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:16:55+00:00 2026-05-13T22:16:55+00:00

I had posted one question earlier jQuery inconsistency in setting readonly attribute in IE-8

  • 0

I had posted one question earlier jQuery inconsistency in setting readonly attribute in IE-8 and FF-3.5.8 and was quite happy with the answer.

But I did notice that if you update (any??) DOM elements dynamically, then view source (using browser’s view source) I find the updated DOM element attribute retains its older value(before update). However, if you use Firebug/IE Developer toolbar, it displays the updated DOM

Example:http://gutfullofbeer.net/readonly.html

FF3.5-View page Source:

<html>
  <head>
    <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js' type='text/javascript'></script>
    <script>
      $(function() {
        $('input.readonly').attr('readonly', true);//set input with CSS class readonly to readonly
      });
    </script>
  </head>
  <body>
    <input type='text' class='readonly' maxlength='20' value='Blort'>This one is read-only<br>
    <input type='text' maxlength='20' value='Fish'>This one is not read-only<br>

  </body>
</html>

Here the first text box is set to readonly in jQuery’s document.ready method. Viewing the source with browser would give a markup like

<input type='text' class='readonly' maxlength='20' value='Blort'>

and Firebug will give something like

<input type="text" value="Blort" maxlength="20" class="readonly" readonly=""> 

IE8 Developer toolbar:

<input class="readonly" type="text" maxLength="20" readOnly="readonly" value="Blort"/>

So my guess is that the browser (IE8/FF3.5) generates the html source much earlier before DOM events kick in (in my case it is jQuery’s document.ready() )

Can someone tell me whats happening behind the scene ?

  • 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-13T22:16:55+00:00Added an answer on May 13, 2026 at 10:16 pm

    The view source is the source downloaded to the browser. What happens in memory doesn’t get updated in the source.

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

Sidebar

Related Questions

I posted another one on this,, but i had to edit it really much...
I had posted this earlier on Stack Overflow, but couldn't get a positive result.
I had posted a question in regards to this code. I found that JTextArea
This is a followup question to the one I posted last week Ajax.ActionLink not
I had posted a question on DateTime to String conversion, I got many satisfying
EDIT: I figured out the answer to the original YUI3 question I posted here,
When I first posted this question I had strong coupling between my web service
A short time ago, this function was posted in an answer to a question.
Had a good search here but can't see anything that gets my mind in
Had this working; at one stage. The problem is the following text is now

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.