Targeting links to a specific frame using javascript...
Hey there,
I'm having a problem with a javascript navigation menue I'm using on my site. I can't seem to figure out how to target a link to a specific frame. In normal HTML it's simple, just add in target="TOPFRAME" or whatever. However, I'm not too familiar with javascript so I have no idea how to accomplish that same task using js. Can anyone help me out? I'd greatly appreciate it.
function GoTo(){
if(this.LinkTxt){
status='';
var HP=Nav4?this.LowLyr:this;
LowItem(HP);
this.LinkTxt.indexOf('javascript:')!=-1?eval(this.LinkTxt):DcLoc.location.href=this.LinkTxt}}
Originally posted by gil davis I believe this is the function from menu_com.js:
Code:
function GoTo(){
if(this.LinkTxt){
status='';
var HP=Nav4?this.LowLyr:this;
LowItem(HP);
this.LinkTxt.indexOf('javascript:')!=-1?eval(this.LinkTxt):DcLoc.location.href=this.LinkTxt}}
Change the last line to:
window.top.TOPFRAME.location.href=this.LinkTxt
Alrighty, thanks! I'm still kinda confused on how to insert that, though. The current script is:
Originally posted by gil davis Oops! the forum hosed my post. I edited it to eliminate the smiley. However, that does not answer your current question.
I thought you wanted *all* the links to go to the frame. You'll have to tell me what each part of the array means.
Well, I do want them to all open in the desired frame. Haha, sorry for any confusion... I have no idea how to do anything with js, just HTML.
Alright, so where do I put that script at if it doesn't go where I said?
Bookmarks