Changing text in another frame

A

adrian

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
 
S

Steve C. Orr [MVP, MCSD]

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/d...n/html/vbconintroductiontowebusercontrols.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriwebusercontrols.asp
http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.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("MyLabel1").innerhtml='whatever';
 
R

Rajesh.V

This one is for a textbox, shud be same/similiar for label

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top