English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Using Javascript, how do I grab a certain portion of HTML (from part of a page) from within one frame to be used as a value for a variable in another frame?

It might be hard to understand, sorry. Here's a better picture, I hope:

This is a Javascript-based tool I am currently working on. I have a window with 2 frames. In the 1st frame, there is a series of buttons and text fields. Each button performs a different function that returns a certain site with information and displays it onto the 2nd frame. I would like to copy some information from the HTML that is being displayed on the 2nd frame, so that it is can be used as a variable on the 1st frame.

Any ideas to get me started? Thx!! =D

2007-01-08 23:24:33 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

If the site in the second frame has a different domain, you will not be able to access it from Javascript. It's a security-restriction that has been present in browsers since NN2 and IE3. It might be possible if you had a signed Javascript, but you would have to purchase that license.

If the site does have the same domain, you can access it using the Top and Frames object.

top.frames[ 1].document.properties

You will probably need to adjust the index used for frames[].

2007-01-09 00:31:05 · answer #1 · answered by Kookiemon 6 · 0 0

Hey
Well i got this cool site it might be interesting, It has all about computer programing and languages and etc.
The site is www.w3schools.com

Best Wishes
Chulan

2007-01-08 23:33:32 · answer #2 · answered by ~Insanity Has Taken Over~ 3 · 0 0

fedest.com, questions and answers