Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide a Frame But Still Execute It?

Status
Not open for further replies.

scripter73

Programmer
Apr 18, 2001
421
US
Hi,

I have a page (home.html) that's made up of 3 Frames:

1) Frame A (logs in users and has a link that invokes a page containing two other frames after its clicked).

2) Frame B is a form (to perform a Search) that has a Submit button.

3) Frame C shows the results of that Search.

**********

Question/Goal: How do I hide Frame B, but:

a) still have Frame A create it

b) automatically click the Submit button from Frame B,
so I can get to Frame C.

Here's how my pages are set up:

Home.html
.....
<frameset>
<frame name=&quot;lowerleft&quot; src=&quot;FrameA.html&quot;>
<frame name=&quot;lowerright&quot; src=&quot;FillerPage.html&quot;>
</frameset>
*Note: FillerPage.html will be replaced by
another page, Search.html, when
Home.html is refreshed automatically.

.....

Search.html
.....
<frameset>
<frame name=&quot;queryDefine&quot; src=&quot;FrameB.html&quot;>
<frame name=&quot;queryResult&quot; src=&quot;FrameC.html&quot;>
</frameset>
.....

I think I should also add that FrameB.html form is pre-populated with the information that I want. I just need to automatically click the Submit button. I don't want users to see FrameB.

Thanks in advance for any help you can provide.

scripter73




Change Your Thinking, Change Your Life.
 
Hi Scripter73-

I think you should have your framset as follow:

Home.html
.....
<frameset>
<frame name=&quot;lowerleft&quot; src=&quot;FrameA.html&quot;>
I will put some javascript here to check the location.search of the document and make visible or not the lowerright frame depending on its value (Ex. if (location.search.substr(1)== &quot;0&quot;{not make visible frame}).
<frame name=&quot;lowerright&quot; src=&quot;Search.html&quot;>
</frameset>

In FrameA.html i will put this when you click on link to Search.html:

onclick=window.location=&quot;Search.html?1&quot;

Hope I'm making sense
Placido


 
Hi Placido,

Thanks for your great help. Here's the situation. FrameA.html is already coded so that if a user clicks on a button, then the results are shown in the lowerright (or Search.html frame).

The issue is that I don't want the user to have to click on the button in order to generate the results. I want to do this automatically.

I still want the lowerright frame to show though, but not the lowerleft. The problem is that's where the form is.

Thanks for your help, though.

scripter73
Change Your Thinking, Change Your Life.
 
Hi Scripter73-

Put focus on submit button of FrameB.html and onFocus submit automatically form and reload Search.html without FrameB.html by checking status of location.search...

Ciao
Placido
 
part a)
Use <frameset cols=&quot;*,100%&quot;> in search.html

part b)
use an onload event in the body tag of frameb
eg <body onload=&quot;myfunc()&quot;>

part c)
reloading framec can be done from myfunc() Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top