Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > writing to a text box on a different frame!

Reply
Thread Tools

writing to a text box on a different frame!

 
 
MTC
Guest
Posts: n/a
 
      08-17-2004
Hi all and thanks in advance
I have an HTML page with 3 frames. Lets call them top middle and bottom.

On the top frame there is a button to run some java script! When it is run
I want to put some text into the middle frame, but in to a text box on a
form call "testform" textbox name is "TestText"

I know I need to address the frame name but what am I missing?

Parent.frames("middle").TextText.value = "here is the data"

Thanks.

mike



 
Reply With Quote
 
 
 
 
Michael Winter
Guest
Posts: n/a
 
      08-18-2004
On Tue, 17 Aug 2004 19:41:02 -0400, MTC <> wrote:

[snip]

> I know I need to address the frame name but what am I missing?
>
> Parent.frames("middle").TextText.value = "here is the data"


Four things:

1) You don't subscript an array with parentheses - you use brackets.
2) A reference to the form.
3) Parent should be in all lowercase.
4) The semicolon ( - not strictly necessary, but good form.

Try:

parent.frames['middle'].forms['testform'].elements[
'TextText'].value = 'Here is the data.';

Forgive any errors in that; I never use frames so my syntax might be off.
It should help you on your way, though.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
div box questions; float text around a box, fit box to image size Gnarlodious HTML 4 05-05-2010 11:30 AM
Conversion of text box as list box Neelu Java 1 01-10-2006 09:57 AM
Width of text input box vs. password input box cjl HTML 1 10-31-2005 11:46 AM
Linking a text box and/or a list box to an Access table's column. ryan.d.rembaum@kp.org ASP .Net 1 08-05-2005 04:17 AM
How to delete list box(text box) VRao Computer Support 3 01-24-2004 04:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57