0

In the HTML document there is script tag that contains some javascript function

<div class="container">
<div id="container2">
    <div id="container3">      
        <script>        
            loadme ('main');
        </script>
    </div>   
</div>

But when I do 'Inspect Element' on browser, instead of this, appears a block of tags.

<div class="container">
<div id="container2">
    <div id="container3">
        <div class="content">
            <div class="contenthead">
                Some Text
            </div>
            <div class="c1">
                <div class="c2">
                    <form id="myForm">
                        <label>
                            Text
                        </label>                    
                    </form>
                    <div class="c3">                            
                        <a href="#" onclick="javascript:f1('Text', 0, 0)">
                        </a>    
                    </div>
                    <div class="clear">
                    </div>
                </div>
            ...

I want to get this block with my own app but I cannot. I use Delphi TWebBrowser to do this. How can I get this HTML code using Delphi WebBrowser?

1
  • 1
    "I want to get this block with my own app but I cannot." What prolem are you having? When I started trying something similar, I assumed that elements generated by javascript would not be accessible via the DOM. But that turned out to be incorrect: If they show up in the IE Developer Tools window, they are ime accessible via the DOM. Commented Jul 17, 2014 at 9:31

1 Answer 1

0
  • Yes, obviously. because while inspecting through Firefox Firebug or Chrome Firebug or IE Firebug, you can't see the script like the one you mentioned.

  • And you can see your script tag by viewing through Source Window (ctrl + u => shortcut to open source window for Chrome and Firefox. )

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.