//flex table opened by JP

Click to See Complete Forum and Search --> : Synchronizing HTML with the page


Sam Hobbs
07-01-2008, 02:07 AM
I need to create a HTML viewer/scraper tool, so I will have HTML in a window with the corresponing page beside it. I might also have a tree (hierarchical) view. This is for a Windows environment.

I do not know how to get the HTML to scroll into view when the page is clicked. In other words, if I click on a paragraph in the page, I need to see the corresponding p element in the HTML window.

If anyone has a clue about how to do that, I hopefully can figure out the details.

pode1
07-07-2008, 02:22 AM
Do this onclick event ....
<p onclick= "window.parent.frames('otherframe').scrollIntoView (#marker)" >

or something like that ... donīt remember the proper syntax.
Hope it helps!

jjinno
08-03-2008, 07:00 PM
Hmmm... sounds like all you really need is to not re-invent the wheel. :p

Check out FireBug (for Mozilla Firefox <3.0) (https://addons.mozilla.org/en-US/firefox/addon/1843)

Of course, if you absolutely *must* do it the way you are requesting, then you should also check into a JavaScript framework like JQuery (http://jquery.com/) which allows you to simply integrate things like scrolling (http://demos.flesler.com/jquery/scrollTo/) to/through your source code (http://icant.co.uk/sandbox/jquerycodeview/)

:-)