Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

when page re-rendered

Status
Not open for further replies.

peterpann

Programmer
Jun 19, 2007
63
GB
How can I know when a page has re-rendered after an element has changed, such as me making an image larger ? I want to know so that I can get the new height information for wrapped text etc.
 
By "re-rendered" do you mean the page has finished loading? I would say you could probably do this with jquery...


Code:
// ... jquery library...

$(function(){

// Anything here runs after the page is done loading...

});

Jason

[red]Army[/red] : [white]Combat Engineer[/white] : [blue]21B[/blue]

 
Hi

I think the OP means the page is re-rendered long after the initial rendering. For example when the visitor resizes an image like this :
Code:
[b]<div[/b] [maroon]style[/maroon][teal]=[/teal][green][i]"display: inline-block; overflow: hidden; resize: both"[/i][/green][b]>[/b]
[b]<img[/b] [maroon]src[/maroon][teal]=[/teal][green][i]"sample.png"[/i][/green] [maroon]style[/maroon][teal]=[/teal][green][i]"width: 100%; height: 100%"[/i][/green][b]>[/b]
[b]</div>[/b]

Feherke.
 
Thanks Feherke. I think if you cannot do it, it cannot be done, ha. Thanks anyway.
 
Hi

Well, I would not say that. Sadly I was never too interested in the DOM events' internals.

There are two events on which I would investigate :
[ul]
[li][tt]DOMSubtreeModified[/tt] seems the appropriate one, triggered by my above example on Gecko[/li]
[li][tt]DOMAttrModified[/tt] looks more a side-effect, triggered by my above example on Gecko and Presto[/li]
[/ul]
None of the above is triggered on WebKit, not tested them on Trident.


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top