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?

Toby Allen
  • 10,997
  • 11
  • 73
  • 124
Ulphat
  • 734
  • 1
  • 7
  • 26
  • 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. – MartynA Jul 17 '14 at 09:31

1 Answers1

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. )

jamal
  • 53
  • 1
  • 1
  • 5