Results 1 to 4 of 4

Thread: What is the property of dhtml innertext method

  1. #1
    Join Date
    Jan 2009
    Posts
    84

    What is the property of dhtml innertext method

    Can anyone provide me the property for Inner text method, I have seen that many of my colleague have done the good applications using Inner text methods, such as calculator and all that, Please let me know whether is it true, and the property for Inner text.

  2. #2
    Join Date
    Oct 2008
    Posts
    119

    re: What is the property of dhtml innertext method

    With Dynamic HTML and Internet Explorer 4 and 5 you can update the text on the page after the page is rendered. The innerText property is valid for block elements only. By definition, elements that do not have both an opening and closing tag cannot have an innerText property. The trick is to use the ID attribute as a unique identifier for the tag.The innerText property is read-only on the html, table, tBody, tFoot, tHead, and tr objects. When the innerText property is set, the given string completely replaces the existing content of the object.

    Source :MSDN

  3. #3
    Join Date
    Oct 2008
    Posts
    180

    re: What is the property of dhtml innertext method

    The use of Innertext in any programming language would be generally as follows as i will explain it to you with the very simple example.

    Code:
    <HTML>
    <BODY>
    <p id="example" 
       onmouseout="example.innerText='Short description';"
       onmouseover="example.innerText='Longer description of the same item using DHTML for IE.';">
       Short description
     </p>
    </BODY>
    </HTML>
    Every developer may have the different requirement for their program, and therefor the convention for the innertext method differs.

  4. #4
    Join Date
    Mar 2008
    Posts
    382

    re: What is the property of dhtml innertext method

    Use the innerText to safely add dynamic text to a Web page. Unlike other properties, innerText does not execute script when inserting text into the Document Object Model (DOM) of a Web page.Because of the flexibility of DHTML, there is often more than one way to accomplish what you want to do. Understanding how the HTML parsing and rendering component of Windows Internet Explorer processes your requests can give you the edge when deciding which methods work best for the job.

    You can set this property only after the onload event fires on the window. When dynamically creating a tag using TextRange, innerHTML, or outerHTML, use Microsoft JScript to create new events to handle the newly formed tags. Microsoft Visual Basic Scripting Edition (VBScript) is not supported.

Similar Threads

  1. What are dynamic controls in DHTML
    By Maximiliano2 in forum Software Development
    Replies: 5
    Last Post: 13-11-2010, 06:30 AM
  2. Replies: 6
    Last Post: 13-05-2010, 12:11 PM
  3. Confused between Dhtml and Ajax
    By Protectors in forum Software Development
    Replies: 5
    Last Post: 11-03-2010, 04:56 PM
  4. How to use DHTML for indexing of web
    By Kallol in forum Windows Software
    Replies: 5
    Last Post: 04-03-2010, 06:02 AM
  5. Definition of a property line in a method
    By Zool in forum Software Development
    Replies: 3
    Last Post: 23-11-2009, 02:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,715,406.58862 seconds with 17 queries