Controlling another frame.

Posted on 2003-03-10
Medium Priority
Last Modified: 2010-04-06
I know i should not use frames, but this is not my site.

Lets make this easy, i have a query run on the left frame called FraLeft, and i want it to put the rusults of one of my dbse fielsds in a textbox on FraMain, how can i do this AUTOMATICALLY i do not want to refresh either page.

Hope this makes sense
Question by:bolox
LVL 17

Expert Comment

ID: 8103349
Can you clarify?

It sounds like you want to submit a form in one frame to a server side script, with the content being reloaded in the same frame. THEN you want to change the content on an <input> of type="text" in a DIFFERENT frame based on the results of that query. Correct?

Expert Comment

ID: 8103563
well if you have a form that a user has to submit in order to query a database, the results have to be returned somewhere. If you dont want any one to see them, then you can always target an invisible frame. depending on how the results are returned, there are a couple of possibilities in getting the results into the text input in the other frame's form.

basically the command will be:

parent.FraMain.document.formname.inputname.value = 'whatever';

if you need some more info on how to implement this in your situation, please try and give a little more info to answer the questions above
LVL 30

Expert Comment

ID: 8107094
seems to me you want to submit from 'FraLeft' having the result displayed on 'FraMain'. if that's the case then you just need to set the target of your form pointing to 'FraMain'.

<form name="frm" method="post" action="result.asp" target="FraMain">

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

ID: 8109655
Thankyou Tconnolly, just what i am after,

In javascript, i can see how to make a text box enabled or disabled, how about make it visible or not????

B (i will up the points if you can answer this)

Accepted Solution

tconnolly earned 200 total points
ID: 8111497
well if you just want an invisible text box, then within the input tag, you can put:

style="visibility: hidden"

but if you want to do it as an action in javascript, the command would be:

parent.FraMain.document.formname.inputname.style.visibility= 'hidden';

Author Comment

ID: 8472867
Just the ticket, thanx

Author Comment

ID: 8472868
Just the ticket, thanx

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question