Click to See Complete Forum and Search --> : Java Link Menu / Frames / Targets


j_a_m_e_s69
05-27-2003, 08:48 AM
I have downloaded the SLICK TREE menu from www.javafile.com.
It looks really cool, and i have been changing the colours etc with my minimal Java knowledge.

I have made a frameset, with leftframe on the left (This contains "link.htm" where my Java Applet is) and mainframe on the right.

The problem comes, when I start to edit the links...
When a link is clicked, the link is displayed in a new window.
What I am wanting is for the link to open in a frame called mainFrame. I have tried to mess about with the TARGET tag (html i think) which doesnt work...

The code for the applet is:

<applet code="SlickTree.class"
archive="SlickTree.jar"
width="140"
height="696">
<param name="menu" value="
{Home,http://javaboutique.com}
{Navigation}
{ Heading One}
{ Link One}
{ Link Two}
{ Link Three}
{ Link Four}
{ Heading Two}
{ Link Five}
{ Link Six}
{ Link Seven}
{ Link Eight}
{ Link Nine}
{ Link Ten,,_new}
{ Link Eleven,,_new}
{ Link Twelve,,_new}
{ Link Thirteen,,_new}
{Links}
{ Ebay.co.uk,http://www.ebay.co.uk/,_new}
{ Hsbc.co.uk,http://www.hsbc.co.uk/,_new}
{ HTFR.com,http://www.htfr.com/,_new}
">
<param name="autoCollapse" value="ok">
<param name="longHighlight" value="">
<param name="bgColor"
value="ffffff">
<param name="textColor"
value="000000,000000,000000">
<param name="mouseTextColor"
value="000000,000000,000000">
<param name="optionColor"
value="ffffff,f5f5f5,f5f5f5">
<param name="mouseOptionColor"
value="e4e4e4,e4e4e4,e4e4e4">
<param name="mouseOverEffect"
value="leftright,shrinkVer,flipY">
<param name="showOptionEffect"
value="shrink,shrink2,flip">
<param name="delayTime" value="20">
<param name="visibilityStep" value="2">
<param name="mouseOverStep" value="50">
<param name="spacing" value="30">
<param name="depthSpace" value="30">
<param name="rounding" value="15">
<param name="showDelay" value="10">
<param name="textFont"
value="Times;n;12,Arial;n;10;Times;n;12">
<param name="mouseTextFont"
value="Times;n;12,Arial;n;10;Times;un;10">
<param name="AppletHomePage"
value="http://go.to/javabase">
<param name="host" value="javabase">
<param name="key" value="cacowcbu">
</applet>

Any help or suggestions on this would be GREATLY appreciated!

Thanks,

James Bailey:)

khalidali63
05-27-2003, 09:40 AM
Hello James,

It doesn't look like that there is a prameter for applet that will cause the redirecto any particular frame,you might have soem JavaScript code that is probably doing this,please post a link so that some one can view the source and help you with solution.

j_a_m_e_s69
05-27-2003, 11:23 AM
The location of my website is

http://website.lineone.net/~bailey160/

The actual links that I want active at this stage are

{Links}
{ Ebay.co.uk,http://www.ebay.co.uk/,_new}
{ Hsbc.co.uk,http://www.hsbc.co.uk/,_new}
{ HTFR.com,http://www.htfr.com/,_new}

My basic knowledge is suggesting that these links are opening in a new window due to the

,_new

bit of text in there.

As mentioned before, my problem is that i want these links to load into a frame located on the page called "mainFrame"

I hope this makes sence people!

James Bailey

khalidali63
05-27-2003, 12:13 PM
seems like its the aplet thats direction,
try replacing

Ebay.co.uk,http://www.ebay.co.uk/,_new
_new in the above with the name of the frame where you wnat this link to open.

j_a_m_e_s69
05-27-2003, 12:22 PM
Nope, I retyped what you said

Ebay.co.uk,http://www.ebay.co.uk/,_mainFrame}

and it still opens in a brand new window like before!?

James

khalidali63
05-27-2003, 12:47 PM
I was afraid of that,I guess if you have the code for applet you can post that,because we can not change its functionality with javaScript

j_a_m_e_s69
05-27-2003, 12:59 PM
Sorry, I don't understand what you mean!? All of the coding that I have is included in the initial posting..

Thanks

James

khalidali63
05-27-2003, 01:15 PM
The redirection/targetting seems like is being done in the applet.
To make it target something diferent,we will need to see tha applet code,
or else you can keep playing with
_new param and try changing it to other valid values for target attribute,the applet writer might have some code to honor that.
other then that..you are stuck...

j_a_m_e_s69
05-27-2003, 01:28 PM
Ok, and to see the Applet Code, you need the files that also came in the .Zip file??:

generator.js
SlickTree.class
SlickTree.jar

If so, these files are available from

http://www.javafile.com/menuing/slick/slick.php?cat=Menuing

James

Suaviterinmodo
11-01-2006, 09:28 PM
I'm having a similar problem.

I used a menu generator called AllWebMenusPRO 4.2 that generated my menu for me. When the link is clicked, the linked page opens in its own frame, not the main or parent frame.

Here is the menu code:

//----------DHTML Menu Created using AllWebMenus PRO ver 4.2-#630---------------
//C:\Documents and Settings\Owner\My Documents\judithbarsi.awm
var awmMenuName='menu';
var awmLibraryBuild=630;
var awmLibraryPath='/awmdata';
var awmImagesPath='/awmdata';
var awmSupported=(navigator.appName + navigator.appVersion.substring(0,1)=="Netscape5" || document.all || document.layers || navigator.userAgent.indexOf('Opera')>-1 || navigator.userAgent.indexOf('Konqueror')>-1)?1:0;
if (awmAltUrl!='' && !awmSupported) window.location.replace(awmAltUrl);
if (awmSupported){
var nua=navigator.userAgent,scriptNo=(nua.indexOf('Safari')>-1)?7:(nua.indexOf('Gecko')>-1)?2:((document.layers)?3:((nua.indexOf('Opera')>-1)?4:((nua.indexOf('Mac')>-1)?5:1)));
var mpi=document.location,xt="";
var mpa=mpi.protocol+"//"+mpi.host;
var mpi=mpi.protocol+"//"+mpi.host+mpi.pathname;
if(scriptNo==1){oBC=document.all.tags("BASE");if(oBC && oBC.length) mpi=oBC[0].href;}
while (mpi.search(/\\/)>-1) mpi=mpi.replace("\\","/");
mpi=mpi.substring(0,mpi.lastIndexOf("/")+1);
var e=document.getElementsByTagName("SCRIPT");
for (var i=0;i<e.length;i++){if (e[i].src){if (e[i].src.indexOf(awmMenuName+".js")!=-1){xt=e[i].src.split("/");if (xt[xt.length-1]==awmMenuName+".js"){xt=e[i].src.substring(0,e[i].src.length-awmMenuName.length-3);if (e[i].src.indexOf("://")!=-1){mpi=xt;}else{if(xt.substring(0,1)=="/")mpi=mpa+xt; else mpi+=xt;}}}}}
while (mpi.search(/\/\.\//)>-1) {mpi=mpi.replace("/./","/");}
var awmMenuPath=mpi.substring(0,mpi.length-1);
while (awmMenuPath.search("'")>-1) {awmMenuPath=awmMenuPath.replace("'","'");}
document.write("<SCRIPT SRC='"+awmMenuPath+awmLibraryPath+"/awmlib"+scriptNo+".js'><\/SCRIPT>");
var n=null;
awmzindex=1000;
}

var awmSubmenusFrame='';
var awmSubmenusFrameOffset;
var awmOptimize=0;
var awmUseTrs=0;
document.write('</table>');
var awmSepr=["0","","",""];
function awmBuildMenu(){
if (awmSupported){
awmCreateCSS(1,2,1,'#FFFFFF','#0055E5',n,'14px sans-serif',n,'none',0,'#000000','0px 0px 0px 0',0);
awmCreateCSS(0,2,1,'#FFFFFF','#0055E5',n,'14px sans-serif',n,'none',0,'#000000','0px 0px 0px 0',0);
awmCreateCSS(0,1,0,n,n,n,n,n,'outset',2,'#C0C0C0',0,0);
awmCreateCSS(1,2,1,'#E328CF','#F5E5F1',n,'14px sans-serif',n,'none',0,'#000000','0px 0px 0px 0',1);
awmCreateCSS(0,2,1,'#FFFFFF','#F70873',n,'14px sans-serif',n,'none',0,'#000000','0px 0px 0px 0',1);
var s0=awmCreateMenu(0,0,0,0,1,0,0,0,0,10,10,0,0,2,0,1,0,n,n,100,0,0,10,10,0);
it=s0.addItem(0,1,1," Site Navigation ",n,n,"","",n,n,n,n,n,0,0,0,0);
it=s0.addItem(3,4,4," Site News/Updates ",n,n,"","http://www.judithbarsi.com/forum/index.php?showforum=23",n,n,n,"http://www.judithbarsi.com/forum/index.php?showforum=23",n,0,0,2,0);
it=s0.addItem(3,4,4," Biography ",n,n,"","http://www.judithbarsi.com/biojb.html",n,n,n,"http://www.judithbarsi.com/biojb.html",n,0,0,2,0);
it=s0.addItem(3,4,4," Filmography ",n,n,"","http://www.judithbarsi.com/filmographyjb.html",n,n,n,"http://www.judithbarsi.com/filmographyjb.html",n,0,0,2,0);
it=s0.addItem(3,4,4," Gallery ",n,n,"","http://www.judithbarsi.com/gallery/gallery.asp",n,n,n,"http://www.judithbarsi.com/gallery/gallery.asp",n,0,0,2,0);
it=s0.addItem(3,4,4," Forum ",n,n,"","http://www.judithbarsi.com/forum/",n,n,n,"http://www.judithbarsi.com/forum/",n,0,0,2,0);
it=s0.addItem(3,4,4," The Judith Fund ",n,n,"","http://www.judithbarsi.com/donations.html",n,n,n,"http://www.judithbarsi.com/donations.html",n,0,0,2,0);
it=s0.addItem(3,4,4," FAQ ",n,n,"","http://www.judithbarsi.com/faq.html",n,n,n,"http://www.judithbarsi.com/faq.html",n,0,0,2,0);
it=s0.addItem(3,4,4," Sign Judith's Dreambook ",n,n,"","http://books.dreambook.com/judithbarsi/judithbarsi.sign.html",n,n,n,"http://books.dreambook.com/judithbarsi/judithbarsi.sign.html",n,0,0,2,0);
it=s0.addItem(3,4,4," View Judith's Dreambook "," Item "," Item ","","http://books.dreambook.com/judithbarsi/judithbarsi.html",n,n,n,"http://books.dreambook.com/judithbarsi/judithbarsi.html",n,0,0,2,0);
it=s0.addItem(3,4,4," Contact Us ",n,n,"","http://www.judithbarsi.com/contactus.html",n,n,n,"http://www.judithbarsi.com/contactus.html",n,0,0,2,0);
it=s0.addItem(3,4,4," Links ",n,n,"","http://www.judithbarsi.com/links.html",n,n,n,"http://www.judithbarsi.com/links.html",n,0,0,2,0);
s0.pm.buildMenu();
}}

If unable to see, the js url is:

http://www.judithbarsi.com/menu.js

I haven't a clue as to where to manipulate the code nor what to type in to change it. All I really need is the pages the links point to to display in my main (parent?) frame when clicked as it should be.