Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Using Javascript to look at a frame's contents from another (sibling)frame

Reply
Thread Tools

Using Javascript to look at a frame's contents from another (sibling)frame

 
 
Aaron C
Guest
Posts: n/a
 
      11-21-2009
Hey all,
I am having a hard time getting something to work, and am hoping that
the collective experience of this group can help me out.

I have built myself a helper-frameset to make searches a little
faster. Yes, it's lazy of me, and unneccesary, but I wanted a project.

the manual process this replaces:
1) go to the "advanced search" page of a social networking site
2) enter the keyword that I'm searching on
3) enter the limiting criteria
4) open each person's profile to see if they match what I need
5) Lather, rinse, repeat. I have multiple keywords (always from the
same list) for each of my limiting criteria.

Currently, the frameset loads a page that I built with an input box,
and a few links. Type the limiting criteria in to the box, hit go. The
page reloads with links that have each of the keywords for those
criteria. Each of the generated links combines steps 1-3 into one
click.

What I'm trying to find is a way to use the top frame (name="_top"),
where all of those links are, to recreate a table of links from the
bottom frame (name="_bott").

Where I'm stuck is getting javascript in _top to read ANYTHING in
_bott. I don't know if I have bad syntax, or if i'm missing a step in
my code, or if what I'm trying to do is actually even possible.

Any way you can help?
 
Reply With Quote
 
 
 
 
Doug Gunnoe
Guest
Posts: n/a
 
      11-21-2009
On Nov 21, 5:29*am, Aaron C <(E-Mail Removed)> wrote:
> Hey all,
> I am having a hard time getting something to work, and am hoping that
> the collective experience of this group can help me out.
>
> I have built myself a helper-frameset to make searches a little
> faster. Yes, it's lazy of me, and unneccesary, but I wanted a project.
>
> the manual process this replaces:
> 1) go to the "advanced search" page of a social networking site
> 2) enter the keyword that I'm searching on
> 3) enter the limiting criteria
> 4) open each person's profile to see if they match what I need
> 5) Lather, rinse, repeat. I have multiple keywords (always from the
> same list) for each of my limiting criteria.
>
> Currently, the frameset loads a page that I built with an input box,
> and a few links. Type the limiting criteria in to the box, hit go. The
> page reloads with links that have each of the keywords for those
> criteria. Each of the generated links combines steps 1-3 into one
> click.
>
> What I'm trying to find is a way to use the top frame (name="_top"),
> where all of those links are, to recreate a table of links from the
> bottom frame (name="_bott").
>
> Where I'm stuck is getting javascript in _top to read ANYTHING in
> _bott. I don't know if I have bad syntax, or if i'm missing a step in
> my code, or if what I'm trying to do is actually even possible.
>
> Any way you can help?


If the bottom frame contains a page loaded from a different domain,
you can't do it.

http://en.wikipedia.org/wiki/Same_origin_policy

I thought the FAQ covered this specifically, but I don't see it:

http://www.jibbering.com/faq/#frameRef
 
Reply With Quote
 
 
 
 
Dr J R Stockton
Guest
Posts: n/a
 
      11-21-2009
In comp.lang.javascript message <ed6eac53-0d59-47ea-8442-504e0ef4e481@x5
g2000prf.googlegroups.com>, Sat, 21 Nov 2009 03:29:42, Aaron C
<(E-Mail Removed)> posted:
>
>Where I'm stuck is getting javascript in _top to read ANYTHING in
>_bott. I don't know if I have bad syntax, or if i'm missing a step in
>my code, or if what I'm trying to do is actually even possible.
>
>Any way you can help?



A copy of <URL:http://www.merlyn.demon.co.uk/linxchek.htm> does that,
accessing the whole displayed text and the links and anchors arrays. To
see how, scan its source for "Fram" and read near where you see it.
Everything it reads is on the same system as it is itself.

But, from your description, ISTM that you may be trying to use a page in
your domain to read the content of an iframe loaded from an alien
domain.

And ISTM that, if that could be done, it could easily be misused.

You should, of course, have mentioned the nature of the error messages
reported in the Error Console or equivalent. For me, Firefox generally
gives the most rapidly useful report; but, where that does not help
enough, the extra detail on Opera is sometimes useful.

--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding contents on yaml file without overwriting actual contents Kamarulnizam Rahim Ruby 4 01-28-2011 09:10 AM
if innerHTML used twice then it replaces the contents i want it to display all the contents virendra.amritkar@gmail.com Javascript 0 06-29-2007 08:13 AM
Need help to look for a specific cross platform vertical scroll javascript that can call an external html page for contents P2P Javascript 0 03-10-2006 02:32 AM
Can I restrict both attribute contents and element contents in schema Don Adams XML 1 03-05-2004 12:48 PM
<tr> with a 1x1 image as a filler on a table with padding of 2 look thicker in netscape but they look ok in IE. Serial # 19781010 HTML 1 08-10-2003 09:05 PM



Advertisments