TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Javascript, AJAX, E4X (http://www.talkphp.com/javascript-ajax-e4x/)
-   -   Get content of site (http://www.talkphp.com/javascript-ajax-e4x/5963-get-content-site.html)

Tanax 09-02-2011 04:39 PM

Get content of site
 
How do I get the content of a specific div-tag on a website that was populated with javascript/AJAX?

(very short first post -- haha)

Tanax 09-02-2011 06:56 PM

Nevermind, I solved it!

tony 09-03-2011 07:32 PM

Good :) what was the solution?

Tanax 09-03-2011 10:32 PM

None :P I didn't need to get it. The javascript that fetched the string to insert into the DIV was already on the page, i.e. they didn't load it from a database or some PHP-script. They simply had it like:
Code:

<script>
getElementById("DIVELEMENT").innerText = "Text I wanted to fetch";
</script>

So I simply parsed that instead to get the text I wanted to fetch :)
Why they choose to do it like that, I have no idea but I don't mind. Made my day a lot easier!


All times are GMT. The time now is 06:57 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0