Click here to Skip to main content
15,910,878 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have one html page with frame tag.
e.g.
<html>
<frameset>
 <frame name"f1" src="t1.html"></frame>
</frameset>


I want to implement html parser/ function on the main page for finding the particular html tag (like "a", "div") inside the "t1.html" page and give back to main page and want to execute this parser/function every time whenever the "f1" frame URL will be changed.

Welcome the suggestions.

thanks in advance... Amit
Posted
Updated 9-Nov-10 21:26pm
v2
Comments
Dalek Dave 10-Nov-10 3:27am    
Edited for Readability.

1 solution

You can reach the document scope of "t1.html" by using the following javascript from your frameset page:

<script>
var documentInFrame = window.frames["f1"].document;
</script>


you could then get all anchor tags like this:

<script>
var documentInFrame = window.frames["f1"].document;

var documentAnchors = documentInFrame.getElementsByTagName("a");
</script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900