473,411 Members | 2,059 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,411 software developers and data experts.

Frames and Control Value Question

I am using frames in a site that I am building (I know! But not my choice).
I have the need to be able to get the value from a DropDown List that is in
one frame and read it from another frame. I know there is a way to do this
using client side code, but I'm not sure how. I've never been a javascript
expert. Any code examples or links to such code would be greatly
appreciated!

Thanks in advance!
Nov 19 '05 #1
2 937
I could do this for you, but I dont have the time to mess around with it at
present. In essence, you need to do something like this.

a.) set up a function to be called in the page in the second frame.
<script lanuage=Javascript>

function addit( str ){

list2.add(str)

}

</script>

b.) from your calling page inside frame1, call the function in frame2
passing it the value you need to add using something like, this ( its not
accurate because I dont do that much JScript at all, but it will be
something like.

parentwindow.parent.document.frame2.document.all( addit('hello');

Now I know the comand above is not correct, but of you do a little digging
around you will find the right syntax. In essence you need to come up to the
parent document and down the iframe into its document and call the funtion
on the remote page.
HTH
--
Terry Burns
http://TrainingOn.net

"David Hearn" <da*********@stagparkway.com> wrote in message
news:eO**************@TK2MSFTNGP15.phx.gbl...
I am using frames in a site that I am building (I know! But not my choice).
I have the need to be able to get the value from a DropDown List that is in
one frame and read it from another frame. I know there is a way to do this
using client side code, but I'm not sure how. I've never been a javascript
expert. Any code examples or links to such code would be greatly
appreciated!

Thanks in advance!

Nov 19 '05 #2
There ya go, I had a few minutes today, so I knocked up a quick tip for you.
This one demonstrates cross frame activity, you can adapt this example to
your scenario with the DropDownList

http://www.trainingon.net/Articles/TIP0006.htm

--
Terry Burns
http://TrainingOn.net

"Terry Burns" <he**@now.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I could do this for you, but I dont have the time to mess around with it at
present. In essence, you need to do something like this.

a.) set up a function to be called in the page in the second frame.
<script lanuage=Javascript>

function addit( str ){

list2.add(str)

}

</script>

b.) from your calling page inside frame1, call the function in frame2
passing it the value you need to add using something like, this ( its not
accurate because I dont do that much JScript at all, but it will be
something like.

parentwindow.parent.document.frame2.document.all( addit('hello');

Now I know the comand above is not correct, but of you do a little digging
around you will find the right syntax. In essence you need to come up to
the parent document and down the iframe into its document and call the
funtion on the remote page.
HTH
--
Terry Burns
http://TrainingOn.net

"David Hearn" <da*********@stagparkway.com> wrote in message
news:eO**************@TK2MSFTNGP15.phx.gbl...
I am using frames in a site that I am building (I know! But not my
choice). I have the need to be able to get the value from a DropDown List
that is in one frame and read it from another frame. I know there is a way
to do this using client side code, but I'm not sure how. I've never been a
javascript expert. Any code examples or links to such code would be
greatly appreciated!

Thanks in advance!


Nov 19 '05 #3

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

Similar topics

6
by: BWGames | last post by:
Hey all, I have a website, which uses frames (I know, I know...). Left frame is a navbar, with the main content in the right frame. I can login using sessions on the right frame, giving...
2
by: Yve | last post by:
Hello, I am new here and received good advice many times before by just reading - now I would like to ask this question: I have got a frameset of 5 frames: navigation and 4 content-frames. How...
40
by: JohnnyCJohnny | last post by:
Is it pretty safe to say that almost all web surfers now use browsers that are Frames compatible? What are most people using these days? IE? Thanks
14
by: TrvlOrm | last post by:
OK. After much playing around, I managed to get my frame page this far.. see code below. BUT...there are still errors with it, and what I would like to have happened is this: 1) On the Left...
1
by: Aki | last post by:
Hi! I've been trying to create a home link in a document that is shown in a frameset of two frames. My aim is to show the first documents that were shown in the frames when the frameset was...
2
by: Bonj | last post by:
H I've got the following problem - I need to have an aspx page with two frames, although the question isn't necessarily about the workings of the frames, more session variables... the frames consist...
7
by: dj Bass | last post by:
simple, they don't like things that restrict the server-side controls... and when it comes to frames, you need client side stuff and that stuff's up the asp.net strategy. right or wrong?
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...
2
by: Griff | last post by:
A novice's view-point (please correct) With CLASSIC ASP, I understand that frames could be beneficial. For example, the left-hand frame could contain the ASP for the navigation tool and the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.