I have two dropdown boxes where clicking each element calls different pages.Each page contain a pdf fileand is diplayed on the upper and lower portion of a page frame respectively.Is it possible to design a mother page with two frames where the content of the frame is selected based on the choice of the dropdown box? The mother page should be divided into two page frame and each frame should contain a page coming dynamicaly from drop down selection.Please help urgently.
How to display different pages in target frames dynamicaly
Yup that is managable
But I think you'll need a little part of the site which isn't framed; otherwise the dropdown box will disappear when you take another frame
Or if you just ment your mother page, with on 1 side a frame that changes; you only have to make 1 Iframe
And change the source of the frame when another option is chosen in the dropdown box
~Gushe
But I think you'll need a little part of the site which isn't framed; otherwise the dropdown box will disappear when you take another frame
Or if you just ment your mother page, with on 1 side a frame that changes; you only have to make 1 Iframe
And change the source of the frame when another option is chosen in the dropdown box
~Gushe
Here;
Since I like making JavaScripts, I made a script for you that will change the source of a specific Iframe:
The Javascript that you should place in the <head> </head> tags:
The Iframe:
(This is just example; The only important thing is ID here; so you can make another Iframe and put in anywhere on your site; as long as its ID is right
)
The Checkbox:
I'll see If I can replace the Iframe with a Frameset; would be alot easier to make it the right size
Hope this helps,
~Gushe
Since I like making JavaScripts, I made a script for you that will change the source of a specific Iframe:
The Javascript that you should place in the <head> </head> tags:
| Code: |
| <script type="text/javascript">
function ChangeFrame() { document.getElementById("frame1").src=document.getElementById("menu").value } </script> |
The Iframe:
(This is just example; The only important thing is ID here; so you can make another Iframe and put in anywhere on your site; as long as its ID is right
| Code: |
| <iframe src="Starting Frame" id="frame1"></iframe> |
The Checkbox:
| Code: |
| <form>
<select id="menu" onchange="ChangeFrame()"> <option>Choose File</option> <option value="Link to file 1">File 1</option> <option value="Link to file 2">File 2</option> <option value="Link to file 3">File 3</option> </select> </form> |
I'll see If I can replace the Iframe with a Frameset; would be alot easier to make it the right size
Hope this helps,
~Gushe
Thanks Gushe, but the appearence is a bit odd with iframe.Cann't it be implemented with frameset?
Thanx in advance.
Thanx in advance.
Sure it goes, If I understand you well..
I'll use a horizontal frameset that will divide your screen in 2.
The mother page will be the upper frame and the frame that changes the lower frame.
[for other frameset options, just change the rows="50%,50%" tags in the frameset. You can see how you like it.
for vertical frameset change the rows into cols.]
of course, you still have to add the right sources to the frames in the frameset
The Frameset:
The Javascript:
The Checkbox:
Hope this is right.
Or do you still mean something else?
Greetz,
~Gushe
I'll use a horizontal frameset that will divide your screen in 2.
The mother page will be the upper frame and the frame that changes the lower frame.
[for other frameset options, just change the rows="50%,50%" tags in the frameset. You can see how you like it.
of course, you still have to add the right sources to the frames in the frameset
The Frameset:
| Code: |
|
<frameset id="myFrameset" rows="50%,50%"> <frame id="upFrame" src="frame_src.htm"> <frame id="downFrame" src="frame_a.htm"> </frameset> |
The Javascript:
| Code: |
|
<script type="text/javascript"> function ChangeFrame() { document.getElementById("downFrame").src=document.getElementById("menu").value } </script> |
The Checkbox:
| Code: |
|
<form> <select id="menu" onchange="ChangeFrame()"> <option>Choose File</option> <option value="Link to file 1">File 1</option> <option value="Link to file 2">File 2</option> <option value="Link to file 3">File 3</option> </select> </form> |
Hope this is right.
Or do you still mean something else?
Greetz,
~Gushe
Thanks Gushe, a bit change is required--
On clicking the menu (say year 2007) an HTML page should be opened(This is already done with your help).Now that page contains the hyperlink (with month Jan, feb,March etc) which when clicked should open the mother page with two frames holding two different pdf files (say file1.pdf in upper and file2.pdf in lower frame when clicked on Jan, file3.pdf in upper and file4.pdf in lower frame when clicked on Feb and so on).Is it possible with your javascipt magic? The link is single, two different files should be opened each time with single click, in one mother page with two frames.Please please help.
PS: EMBED tag is not working with IE6.
On clicking the menu (say year 2007) an HTML page should be opened(This is already done with your help).Now that page contains the hyperlink (with month Jan, feb,March etc) which when clicked should open the mother page with two frames holding two different pdf files (say file1.pdf in upper and file2.pdf in lower frame when clicked on Jan, file3.pdf in upper and file4.pdf in lower frame when clicked on Feb and so on).Is it possible with your javascipt magic? The link is single, two different files should be opened each time with single click, in one mother page with two frames.Please please help.
PS: EMBED tag is not working with IE6.
Well, changing 2 frames with 1 click isn't really a problem; But If you will change the 2 frames.. where will the menu be?
Or will there a menu in each page..? because I don't really understand it.. 
@Gushe: There is a home page with the menu having different years as their element.This is the first page that is to be opened. After clicking any one of the year in the menu the user will be directed to a html page having months as the hyperlink.This page will contain only 12 hyperlinks(one for each month).
Clicking any one of these hyperlink the mother page will be opened with two different files, one at it's upper and one at it's lower frame.Whatever link he may click, the same mother page should be used to display different files(two at a time).
index page(with menu)----->page with 12 hyperlink----->common mother page with two frame.
ONLY THE HOME PAGE WILL HAVE THE MENU.
Please help.
Clicking any one of these hyperlink the mother page will be opened with two different files, one at it's upper and one at it's lower frame.Whatever link he may click, the same mother page should be used to display different files(two at a time).
index page(with menu)----->page with 12 hyperlink----->common mother page with two frame.
ONLY THE HOME PAGE WILL HAVE THE MENU.
Please help.
If I understand you well; you always have to click the "Back" button go go to the menu again?
but it is no problem going to a new page holding 2 frames with content on each frame
~Gushe
but it is no problem going to a new page holding 2 frames with content on each frame
~Gushe
@Gushe: you have understood 100%
.I am a beginner.Waiting for your help.Please help.
You Could just make a new page for each link.
Like For each of the 12 hyperlinks you make a page divided in 2 where you display the 2 pages
I though I had a solution but that would always display the same
for my solution you would still need 12 diferent frames.. and than just HTML would be easier
~Gushe
Like For each of the 12 hyperlinks you make a page divided in 2 where you display the 2 pages
I though I had a solution but that would always display the same
for my solution you would still need 12 diferent frames.. and than just HTML would be easier
~Gushe
So back to square again
.The main objective was to use one target page with two frames for all the 12 links.Can it be done if the hyperlinks are substituted by menu(dropdown)? Please help.
Well;
You can make the page wih the 12 pages; and above that page you make 2 Iframes, which only hold an invicible pixel (so that you can see the links)
then we can do so that if you click the link the content appears in the 2 Iframes
and then we need somewhere a little place without Iframe to make a "Go Back To Link Page" link
Or
You can divide your screen in 3 frames with frameset, 1 very small on which will just hold the 12 links; and than 2 bigger ones with the content.
I can't come up with any more ideas atm.. Sorry..
~Gushe
You can make the page wih the 12 pages; and above that page you make 2 Iframes, which only hold an invicible pixel (so that you can see the links)
then we can do so that if you click the link the content appears in the 2 Iframes
and then we need somewhere a little place without Iframe to make a "Go Back To Link Page" link
Or
You can divide your screen in 3 frames with frameset, 1 very small on which will just hold the 12 links; and than 2 bigger ones with the content.
I can't come up with any more ideas atm.. Sorry..
~Gushe
The second solution is ok for me.Can you please give the sample code? Thanks in advance.
Main page(with menu)->Page with 3 frames,bottom one holding 12 links.
But the thing is two files on the top two frames should be opened by single click at the link.
Please help.
Main page(with menu)->Page with 3 frames,bottom one holding 12 links.
But the thing is two files on the top two frames should be opened by single click at the link.
Please help.
Ok
I'll make code asap
The 1 click 2 page thing isn't a problem.
You just have to fill in all the right links
(page file sources)
~Gushe
I'll make code asap
The 1 click 2 page thing isn't a problem.
You just have to fill in all the right links
~Gushe
Thanks.Egerly waiting for your code.Please solve the backbutton problem also if your time permits.THANKS.
is it possible to display pdf file directly in a frame without embedding them in html?please help.
Yup; Normally it is.
Ok; Progress so far:
I managed to make 3 frames using frameset;
1. Holds a centered drop down menu.
2 & 3 Hold the content you want.
I managed to do it so that when you change the menu in the header, the content of 1 of the frames changes; But I didn't manage yet to change them both:
I can only add 1 value to an option; So the page doesn't know where to get the second.
So that way, It would be Impossible;
BUT;
I just though of something
If I giva variable name as a value to the options.
Then with a switch statement; I can do so if the value is something; it will change change A to content 1 and frame B to content B..
You might not totally understand what I mean; but once it's finished it will be clear.
This will be a slightly longer JS; But I think I can do it
I just need something from you;
Can you give me all the (uploaded) links to the files, and the name of the 12 drop down options?
That would spare you a lot of time; and it might be difficult to find where you have to add what
I'll already make the script, ready to be filled in with the links.
Though.. I'm not sure if it will work with all the different frames.
Because it has to get info in alot of different frames..
Greetz,
~Gushe
Ok; Progress so far:
I managed to make 3 frames using frameset;
1. Holds a centered drop down menu.
2 & 3 Hold the content you want.
I managed to do it so that when you change the menu in the header, the content of 1 of the frames changes; But I didn't manage yet to change them both:
I can only add 1 value to an option; So the page doesn't know where to get the second.
So that way, It would be Impossible;
BUT;
I just though of something
If I giva variable name as a value to the options.
Then with a switch statement; I can do so if the value is something; it will change change A to content 1 and frame B to content B..
You might not totally understand what I mean; but once it's finished it will be clear.
This will be a slightly longer JS; But I think I can do it
I just need something from you;
Can you give me all the (uploaded) links to the files, and the name of the 12 drop down options?
That would spare you a lot of time; and it might be difficult to find where you have to add what
I'll already make the script, ready to be filled in with the links.
Though.. I'm not sure if it will work with all the different frames.
Because it has to get info in alot of different frames..
Greetz,
~Gushe
Its probably me but why not use PHP to do the job?!?
1. I can't do php..
2. I like a "challenge", now most of you advanced programmers will laugh at me and make fun of me, but I"m only a beginner.
Well.. that are my reasons
~Gushe
2. I like a "challenge", now most of you advanced programmers will laugh at me and make fun of me, but I"m only a beginner.
Well.. that are my reasons
~Gushe
The content has to be delivered as standalone application, so PHP is not an option.
@Gushe: In the mean time I have compromised some requirement and made each individual page with two frames to display the contents.After getting your code I will make the change.
In the mean time another major problem arised.The code given by you for opening a html page from the menu(after clicking the menu item) works perfectly for the first time.But if I go back(by back button) and click it again, nothing happens.If I click on another item and go to another page and come back then only that link becomes active again for one more time.Then again it becomes deactivated after coming back.Cannot get around this problem.The code given by you are given below--
Please help as soon as possible.
PS--I have got another code for the same, which is also not working at all.Can have a look.
@Gushe: In the mean time I have compromised some requirement and made each individual page with two frames to display the contents.After getting your code I will make the change.
In the mean time another major problem arised.The code given by you for opening a html page from the menu(after clicking the menu item) works perfectly for the first time.But if I go back(by back button) and click it again, nothing happens.If I click on another item and go to another page and come back then only that link becomes active again for one more time.Then again it becomes deactivated after coming back.Cannot get around this problem.The code given by you are given below--
| Code: |
|
<script type="text/javascript"> function go1() { window.location=document.getElementById("menu1").value } function go2() { window.location=document.getElementById("menu2").value } function go3() { window.location=document.getElementById("menu3").value } function go4() { window.location=document.getElementById("menu4").value } </script> </head> <body bgcolor="#A5BDD8"> <h1 align="center">Welcome to the Meeting section(ONLY 2007 UNDER EXECUTIVE COMMITTEE HAS DATA,however other links are also active)</h1> <h3><font color="#FF0000">Please Enable the activeX control if prompted by browser.</font></h3> <hr> <pre> <table> <tr> <td> <h5>Governing Body</h5> </td> <form> <td><select id="menu1" onchange="go1()"> <option>Select Year</option> <option value="display/gov_26jan.html">2007</option> <option value="display/und_const.html">2006</option> <option value="display/und_const.html">2005</option> <option value="display/und_const.html">2004</option> <option value="display/und_const.html">2003</option> <option value="display/und_const.html">2002</option> <option value="display/und_const.html">2001</option> <option value="display/und_const.html">2000</option> <option value="display/und_const.html">1999</option> <option value="display/und_const.html">1998</option> <option value="display/und_const.html">1997</option> <option value="display/und_const.html">1996</option> <option value="display/und_const.html">1995</option> <option value="display/und_const.html">1994</option> <option value="display/und_const.html">1993</option> <option value="display/und_const.html">1992</option> <option value="display/und_const.html">1991</option> <option value="display/und_const.html">1990</option> <option value="display/und_const.html">1989</option> <option value="display/und_const.html">1988</option> </select></td> </tr> <tr><td colspan="2"><hr></td></tr> <tr> <td><h5>Executive Committee</h5></td> <td><select id="menu2" onchange="go2()"> <option>Select Year</option> <option value="display/executive/2007/ex_2007_list.html">2007</option> <option value="display/und_const.html">2006</option> <option value="display/und_const.html">2005</option> <option value="display/und_const.html">2004</option> <option value="display/und_const.html">2003</option> <option value="display/und_const.html">2002</option> <option value="display/und_const.html">2001</option> <option value="display/und_const.html">2000</option> <option value="display/und_const.html">1999</option> <option value="display/und_const.html">1998</option> <option value="display/und_const.html">1997</option> <option value="display/und_const.html">1996</option> <option value="display/und_const.html">1995</option> <option value="display/und_const.html">1994</option> <option value="display/und_const.html">1993</option> <option value="display/und_const.html">1992</option> <option value="display/und_const.html">1991</option> <option value="display/und_const.html">1990</option> <option value="display/und_const.html">1989</option> <option value="display/und_const.html">1988</option> </select></td> </tr> something like this------------ |
Please help as soon as possible.
PS--I have got another code for the same, which is also not working at all.Can have a look.
| Code: |
|
<html> <head> <script type="text/javascript"> function urlopen(target) { window.open(target) } </script> </head> <body> <p ALIGN=Center> <center> <h1>Example of Form with a Combo Box Hyperlinked using JS</h1> </center> </p> <form> <p>Choose? <select NAME="Choose"> <option VALUE="ABC" onclick="urlopen('http://www.google.com')">Google</option> <option VALUE="DEF" onclick="urlopen('http://www.yahoo.com')">Yahoo</option> <option VALUE="WHATEVER" onclick="urlopen('pagename.html')">FILE</option> </select> </p> </form> </body> </html> |
