| Author |
Menus and Frames (for Website)
|
Caden Matthews
Greenhorn
Joined: May 15, 2004
Posts: 1
|
|
Hey everyone! I know nothing about Java but I'm using a webpage builder that constructs menus in Java. I need to modify the code but I have no idea where to start! So here's the issue: I'm using frames, and the menu is in the top frame. However, I want the bottom frame to change when a menu option is selected. Right now the top frame is changing, so the menu disappears under the newly opened page. In HTML you specify the TARGET frame, and that frame will change. How do you do this in JAVA? Here's some of the code that I thought might be relevant; the entire thing is over 200 lines long, though! 1) Menu2=new Array("Organic Chemistry","http://www...","",3,0,140); 2) var FirstLineFrame='navig'; // Frame where first level appears var SecLineFrame='space'; // Frame where sub levels appear var DocTargetFrame='space'; // Frame where target documents appear 3) var Par=parent.frames[0]&&FirstLineFrame!=SecLineFrame?parent:window; Thanks for reading this. I look forward to some answers to this puzzle! ~ cAden
|
 |
Gregg Bolinger
Sheriff
Joined: Jul 11, 2001
Posts: 15040
|
|
|
Looks like Javascript to me. Not Java. So I will move this to the HTML/Javascript forum. Those guys know all the ins and outs of this kind of stuff.
|
My Blog | DZone Articles
|
 |
Gjorgi Var
Ranch Hand
Joined: Feb 24, 2004
Posts: 85
|
|
Not very sure what would be the issue there, nor if it is possible to use Java for that... If you want to load documents from one frame to another you would normally choose: - inline frames (with the "target" within <a href> for the links to the documents you want to load into the iframe), or -construct an array of links and a function that will change the href property (window.parent.location.href) according to the link that was clicked, and will have the array's index number as its argument. Such a function would then be called with an onclick event and you would load the chosen document from the link into the empty document. This all provided that you have all the frames into the same frameset. Pay attention to addresses and when you check the outcome of your coding make sure that your page does not automatically go into another page's frameset which messes up addressing... I hope this helped a bit...
|
 |
 |
|
|
subject: Menus and Frames (for Website)
|
|
|