?
Solved

Controlling another frame.

Posted on 2003-03-10
7
Medium Priority
?
251 Views
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
Gavin
0
Comment
Question by:bolox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 17

Expert Comment

by:dorward
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?
0
 
LVL 2

Expert Comment

by:tconnolly
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
0
 
LVL 30

Expert Comment

by:third
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">
....


0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 1

Author Comment

by:bolox
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)
0
 
LVL 2

Accepted Solution

by:
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';
0
 
LVL 1

Author Comment

by:bolox
ID: 8472867
Just the ticket, thanx
0
 
LVL 1

Author Comment

by:bolox
ID: 8472868
Just the ticket, thanx
0

Featured Post

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

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.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

752 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