473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

variable from another frame/page

Is it possible for one page to access a variable (or text) from another page
or frame? How is this done?

I want to update a piece of data on one page, and have it update on lots of
different pages. I thought I could define the data as a variable on one
page, and have all the other pages look at and display the variable from that
page. Both pages could be open in a frameset. I have no idea how to do this,
Is it possible? Could a javascript access a text file on the server and post
this into a page? Any ideas?

thanks,
Alex Hunter

Jul 20 '05 #1
2 11151
Alex Hunter <al********@attbi.com> writes:
Is it possible for one page to access a variable (or text) from another page
or frame?
Yes, if you have a reference to the other page (or frame, but frames
are easy to get a reference to if you are in the same window).
How is this done?
Try reading this:
<URL:http://www.infimum.dk/HTML/JSwindows.html#ref_2_6>
I hope it is informative enough.
Both pages could be open in a frameset. I have no idea how to do this,
Having two frames, or accessing data across them?
Is it possible?
Absolutely.
Could a javascript access a text file on the server and post
this into a page? Any ideas?


That is harder. Not all browsers have an easy way to access an
arbitrary file on the server. One solution is to load the file into a
hidden iframe and then use DOM methods to extract the text.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
thanks for the informitave link. I've got it somewhat, but I am still having
some problems.

I made a test page with two frames. The top frame defines three variables,
and the botom frame retrives these variables from the other frame and
displays them. here is the test page:
http://alex.hunter.home.comcast.net/test

It works sometimes, but other times the variables show up as "undefined" on
the bottom frame. reloading the page cycles it between working and not
working. Does anyone have any ideas why it would only work sometimes? I
have tested on Mac OS X with IE and netscape.

any feedback would be apreciated.

thanks,
Alex Hunter


On Wed, 15 Oct 2003 18:21:41 -0400, Lasse Reichstein Nielsen wrote
(in message <3c**********@hotpop.com>):
Alex Hunter <al********@attbi.com> writes:
Is it possible for one page to access a variable (or text) from another
page
or frame?


Yes, if you have a reference to the other page (or frame, but frames
are easy to get a reference to if you are in the same window).
How is this done?


Try reading this:
<URL:http://www.infimum.dk/HTML/JSwindows.html#ref_2_6>
I hope it is informative enough.
Both pages could be open in a frameset. I have no idea how to do this,


Having two frames, or accessing data across them?
Is it possible?


Absolutely.
Could a javascript access a text file on the server and post
this into a page? Any ideas?


That is harder. Not all browsers have an easy way to access an
arbitrary file on the server. One solution is to load the file into a
hidden iframe and then use DOM methods to extract the text.

/L

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Peter | last post by:
L.S. I am developing a PHP-login script (on Lycos Tripod) that uses Session to pass on variables. Below is the entire (stripped) structure that I use. It opens a page where you can Set and Read...
8
by: Hans | last post by:
Hi There, I have a page that has links with some variables and I need to open the results set in a frameset. I have tried doing this in various different ways, but still cannot get the variable...
2
by: luu duong | last post by:
I know this is probably easy but here is the details. I have an asp page that is not inside a frameset. I want to post data to another asp page that is inside a frameset. So firstpage.asp has...
5
by: Dan | last post by:
We have a simple site. It's a frameset with two frames a left and a right. The left frame is essentially a list of records from a database (using a server-side repeater control). When you click...
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
17
by: Bruno | last post by:
I have a feature that is hosted on a different domain from the primary one in a frame, and need to retain values in a cookie. example: A web page at one.com contains a frame which has a page...
11
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.