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

Changing text in another frame

I'd be very grateful if anyone could help me.
I have a frame based setup and from within my main frame
I'm trying to change some text in the header frame. I'm
dabbling with javascript and have succesfully changed the
source of an image using the script:

window.parent.frames(0).document.forms['Header'].elements
['Logo'].src="images/logo_dura.gif";

However I can't seem to do the same with some text I have
rendered as an ASP:label. I'd be prepared to use any tag
if it worked.

Any ideas???

Many Thanks

Adrian
Nov 17 '05 #1
2 1571
This is why using frames in .NET is generally a bad idea.
Usually you're better off partitioning logical sections of your page into
web user controls.
Here's more info:
http://msdn.microsoft.com/library/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ebControls.asp

If you're determined to keep using frames you may be able use some
javascript similar to this to do the job.
window.parent.frames(0).document.all.item("MyLabel 1").innerhtml='whatever';

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"adrian" <ad***********@360software.co.cuk> wrote in message
news:02****************************@phx.gbl...
I'd be very grateful if anyone could help me.
I have a frame based setup and from within my main frame
I'm trying to change some text in the header frame. I'm
dabbling with javascript and have succesfully changed the
source of an image using the script:

window.parent.frames(0).document.forms['Header'].elements
['Logo'].src="images/logo_dura.gif";

However I can't seem to do the same with some text I have
rendered as an ASP:label. I'd be prepared to use any tag
if it worked.

Any ideas???

Many Thanks

Adrian

Nov 17 '05 #2
This one is for a textbox, shud be same/similiar for label

parent.frames.item("toprightframe").document.all.M yTextBox.value = "Zane
Grey";

"adrian" <ad***********@360software.co.cuk> wrote in message
news:02****************************@phx.gbl...
I'd be very grateful if anyone could help me.
I have a frame based setup and from within my main frame
I'm trying to change some text in the header frame. I'm
dabbling with javascript and have succesfully changed the
source of an image using the script:

window.parent.frames(0).document.forms['Header'].elements
['Logo'].src="images/logo_dura.gif";

However I can't seem to do the same with some text I have
rendered as an ASP:label. I'd be prepared to use any tag
if it worked.

Any ideas???

Many Thanks

Adrian

Nov 17 '05 #3

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

Similar topics

3
by: Thomas Brooks | last post by:
Hi all... Quick question for you. I'm trying to change the contents of a frames page after a user has successfully logged in. I'm running into a little bit of difficulty. Here's what I have...
1
by: JP | last post by:
Hi, How can I create a dynamic frameset whose content changes based on user inputs? Specifically, how do I toggle a frame within a frameset? How can I allow a user to "close" or "dock" a...
9
by: F. Da Costa | last post by:
Hi, Does anybody know why IE5+ does *not* honour array objects (like a table) across a session? Example: Frame A contains a var tableVar which is set via form Frame B (on init) using...
2
by: Martin | last post by:
Dear Experts! I'd be grateful if you can help me with this. I'm having an inline frame which points to 'www.externalsite.com'. The page which contains the inline frame has an orange...
24
by: Charles Crume | last post by:
Hello; My "index.htm" page has 3 frames (content, navigation bar, and logo). I set the "SRC" of the "logo" frame to a blank gif image and then want to change it's contents after the other two...
1
by: Julius Mong | last post by:
Dear all, I have the following: <html> <head> .... </head> <frameset ...> <frame .../> <frameset name="page" rows="60,*" ...> <frame src='top.html' .../>
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...
6
Sushi
by: Sushi | last post by:
Hello! I'm new to the Python language(about 2 months). Having done C programming for 2 years I find out I need Python for a final project, and have been trying to do get my head around object...
7
blazedaces
by: blazedaces | last post by:
Hi guys, what I'm I have is a jtable with boolean variables in the first column and text in the next two (checkboxes). I want my tableChanged method to make it so when I check one of the checkboxes...
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...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.