Outerhtml

Jul 23, 2005

In understanding how this works, would it not be possible then to replace an
item with another?

For instance, I have the first paragraph of "Lorem Ipsum" shown in a
division.
At the bottom is a ling showing "next".
Click on the link, the next paragraph replaces te previous.

<p id="lorem1">lorem ipsum stuff.</p>
<p id="lorem2">paragraph 2 stuff.</p>

I attempted to use the "Textual tooltip" swapping routine at Dynamicdrive,
but the code killed the other script for the menu.

What I'm looking for is a simple swap method, like image swapping, without
the use of z-index.

Also, if outerhtml is a solution to my problem, then could I have all the
paragraphs needed on an external page so that the various paragraphs do not
load with the main page?

If you must have a reference see www.somestuff.batcave.net/menu1.html

View 1 Replies


ADVERTISEMENT

Changing The OuterHTML Of An Iframe

Apr 11, 2006

I discovered how to write out the inner HTML of the contents of an
Iframe; I want to know how to write out the outerHTML of the contents
of an Iframe.

frames['iframeid'].document.body.innerHTML allows me to read the inner
HTML of the contents of an iframe and also allows me to write out the
inner HTML of the contents of an iframe.

However using frames['iframeid'].document.body.innerHTML I am only able
to change, in the contents of the iframe, the code in between and
including the body tags; I am not able to change the code above the
body tag such as what is in the head section and what is in the html
tag.

The problem is, that other maneuvers that allow me to read the contents
of an iframe, do NOT allow me to write out the contents of the iframe.
These are:

frames['framid'].document.body.outerText
frames['framid'].document.body.innerText
frames['framid'].document.documentElement.outerHTML

The problem persists if the page originally loaded into the iframe
contains no code.

This looks like an unpredictable inconsistency of the type that makes
Javascript a language to be learned through experimentation. Or is
there some documentation somewhere that lists the read/write abilities
of such lines of code?

View 3 Replies View Related

Document.body.outerHTML Via Bookmarklet

Aug 11, 2006

I'm trying to create a bookmarklet on IE6, that passes the outerHTML of the body element as a GET param my site.

The problem is that for some page (ie mail.yahoo.com) the bookmarklet does not work while for other pages (simpler ones) it does work....

View 2 Replies View Related

JQuery :: Get The OuterHTML Of A Html Object?

Jun 13, 2007

anyone else get the outerHTML of a html object? I can't seem to get it anymore. document.getElementById('log').outerHTML returns undefined.

View 4 Replies View Related

JQuery :: Get OuterHTML Without Loosing Handlers?

Jun 5, 2007

Found here: [URL]
Code:
jQuery.fn.outer = function() {
return $( $('<div></div>').html(this.clone()) ).html();
}
Usage:
alert( $("#toolbar #save").outer() );

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved