Extracting HTML source from Javascript

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Extracting HTML source from Javascript

    I am trying to use the CFHTTP command to pull HTML source into a variable. The
    problem I am running into is that the HTML page is using a javascript file to
    generate the portion of the page that I need to get to. When I pull in the HTML
    page using the CFHTTP command I get the <SCRIPT src=.... command and not the
    resultant HTML it produces. Is there any way to get the resultant HTML
    programatically? I need to sift through the HTML source and parse out some key
    information. Thanks in advance for any help you may offer.

    BobK101060 Guest

  2. Similar Questions and Discussions

    1. extracting a UserControl's HTML ?
      hello, i have a usercontrol in my app that draws a DropDownList and some text. elsewhere, i have a need to extract the control's HTML as if it...
    2. No html source for datagrid
      I posted this earlier but this time I am adding a url if you want to see the datagrid. (Use start date of 11/10/2004). Basically I wanted to know...
    3. extracting Javascript from a web page
      Hi Everyone, I have a perl script which tries to read a web page and then submit data to a form using LWP::UserAgent. The page has some...
    4. get html source of an URL
      Hie, I am trying to write a program doing the following : - I give it an URL (for instance http://www.yahoo.com) - it gets the source of the web...
    5. converting javascript extracting routine to cgi
      noViagraHere wrote: <snipped JavaScript code> You wouldn't, since CGI isn't a programming language. I'm sure it can be done in Perl, though. ...
  3. #2

    Default Re: Extracting HTML source from Javascript

    What you're trying to do isn't possible. JavaScript and ColdFusion aren't able
    to exchange variables by default. To read JavaScript you need to get use of
    WDDX. Would like to help, but I lost the referring link to it. :(

    Der Nickname Guest

  4. #3

    Default Re: Extracting HTML source from Javascript

    Hi, You could set your CFHTTP to point to the SRC part of the SCRIPT tag. For
    example: if your target page contains <script src='myInclude.js'>, then set
    the URL part of CFHTTP to the myInclude.js instead. Now, becareful in that the
    script may be generated at runtime in which case, your best option is to load
    the page in an IFRAME and access that using Javascript (example: iframe is
    called name='myFrame' then use myFrame.document.innerHTML) to get the
    resultant runtime generated html. You could detect if the iframe document is
    loaded and then get the contents. If you need some help, email me at
    [email]dan@digital-crew.com[/email]?subject=MMWF JS Help Regards, Dan.

    Dan-CFTagStore.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139