Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  PHP   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



firefox problem outerHTML not supported solved


Home  > JAVASCRIPT  > firefox problem outerHTML not supported solved 
       

Ok  here is the javascript function you are looking for. mozilla firefox does not support or donot support outerHTML of outerHTML doesnot 
work in firefox. 

here is a simple function that will make outerHTML to work. 

function outerHTML(node) {
    // if IE, Chrome take the internal method otherwise build one
    return node.outerHTML || (
      function (n) {
          var div = document.createElement('div'), h;
          div.appendChild(n.cloneNode(true));
          h = div.innerHTML;
          div = null;
          return h;
      })(node);
}


the code is pretty simple and redable . any way his is the simple description of how outerHTML would work in mozilla firefox with this 
javascript function.

here we creaate an element div using code. 
then appends a child node which is the actual node. the idea is to get the code of that element also. and div.innerhtml will give the 
value of the complete node we have passed. 

i
cancelBubble or cancel bubbling in firefox and ie

detect ctrl key press javascript

How Ajax Work

index

invoke button using javascript

javascript eval ajax

Javascript function to get outerHTML

javascript nested onclick problem not calling inner elements onclick only outer

javascript special key press

outerHTML firefox

passing window.event to a function in firefox javascript function

Remove Blank Geasemonkey

File.exist function in javascript

Javascript function IsNumeric to check if the string is Numeric

Javascript function getlastintstring to get last integers string from a string

GreaseMonkey Javascript to loolp display all images on double click

Javascript function String.contains to check if a string exisit in a string.

firefox problem outerHTML not supported solved

greasemonkey javascript grease monkey show image which are not displayed

Javascript how to navigate to a new page using javascript

Javascript modify title using javascript

passing parameter to a setTimeout Function

Javascript open new window and write content

javascript function xmlhttprequest accessing external site problem greasemonkey solution

javascript end of line

Javascript String Contain or Contains

javascript function substringbetween to find substring of a string betwen two substrings

extended javascript function contains substringBetween

Javascript Validtion Function IsEMail to check if its email

clear the elements of a dropdownlist using javascript

Javascript function to add elements to a dropdownlist

masked div popup light transparent area over html page using html css and javascript

Javascript Select Options Get Selected Value javascript

Jquery Get Selected Value

Jquery Get Selected Text



  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  PHP   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam