mikedikta Posted October 16, 2007 Report Share Posted October 16, 2007 hail,this looks like my previus topic, but it's a bit different:I have a page with to frames, the left one is in my domain with a button, the right one is in other domain (like yahoo.com). The user can navegate in the right frame, and I need to clck in a button in the left frame and get current content of what is showing in the right frame, because I need to extract some strings.I don't need the source, I just need to read a text of what it is showing (ex: the user is now loged in a site)this is what I started://this the main page<html><title>Exemplo de criação de frames</title><FRAMESET cols="50%,50%"><FRAME SRC="frame1.htm" NAME="frame1"><FRAME SRC="http://yahoo.com" NAME="frame2">//could be any external page, will change</FRAMESET><body></body></html>//this is frame1.htm<html><title>Frist Frame</title><body><form name="view"><input type="button" name="source" onclick="get()" value="View This Page's Source"></form><script language="Javascript"><!--function get() {//can you help me? insert the code - thanks}//--></script></body></html>I prefer in javascript, but I if you know in other language be my guest in helpingthnaks Link to comment Share on other sites More sharing options...
justsomeguy Posted October 16, 2007 Report Share Posted October 16, 2007 What are you trying to get from the page? If you want to show a message like "the user is logged in to a site", how do you determine whether or not they are, or how do you know what message to show otherwise? Link to comment Share on other sites More sharing options...
mikedikta Posted October 17, 2007 Author Report Share Posted October 17, 2007 What are you trying to get from the page? If you want to show a message like "the user is logged in to a site", how do you determine whether or not they are, or how do you know what message to show otherwise?Well, I know how the site I want to use shows its data. For example, after the user logs the site will show:Name: John RamboAge: 21Gender: Malethen I need to get those values. I already did this string algorithm to get the fileds, it works when I save the text into a file, but I need to do that online, and I can't find out how to get the page that is being shown .thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted October 17, 2007 Report Share Posted October 17, 2007 The only way you can use Javascript to get external source would be to use AJAX. There's an AJAX tutorial on the w3schools site with examples. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now