/    Sign up×
Community /Pin to ProfileBookmark

javascript target tag?

I’m working on a site, but I really lost it by now!
the page is split up in 2 frames, one frame has a menu, the other frame is supposed to change if you click a link in the menu. But the new page, when you click a menu link, opens in the menu frame. I need something like a target tag, like in html, but I don’t know very much about javascript.
I’ve uploaded the menu frame, it works with a css and a js file (also uploaded). I did not upload the bottom frame, because I had to upload lots of graphics and other stuff when I wanted to do that.
[url]http://www.geocities.com/turboknol/menuuu.htm[/url]

(ehhh, my english is veeeerry bad, I’m a dutch girl :p )
please help me!!

to post a comment
JavaScript

10 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Apr 18.2003 — int menu frame you do have links right?which are clicked and then they open in the same frame?

in those links add attribute target="frameName"

I hope I understood your question correctly..

?
Copy linkTweet thisAlerts:
@DrDaMourApr 18.2003 — the page you supplied has only 1 frame.


If you need to add an inset fram, the tag is


<iframe name="myiframe" src="url"/>

then any links that are supposed to load in taht frame are targeted to myiframe

like so

<a href="url" target="myiframe">link</a>
Copy linkTweet thisAlerts:
@zazaauthorApr 18.2003 — I know the page has only one frame, I didnt upload the rest of it. (it also has a frameset page and a bottom page) I'm creating this site for somebody else, and when its ready it will be uploaded to another domain

the target='framename' doesn't work, I've already tried that
Copy linkTweet thisAlerts:
@DrDaMourApr 18.2003 — well you have some bad punctuation or spelling or something, because it DOES work, so you'll need to post all the pages if you want anyone to check what you're dong wrong.
Copy linkTweet thisAlerts:
@zazaauthorApr 18.2003 — full page (without graphics, it looks really ugly)

http://www.geocities.com/turboknol/set1.htm
Copy linkTweet thisAlerts:
@khalidali63Apr 18.2003 — in the cascademenu.js file look for thsi function

function Do(obj)

{

var cmd = eval(obj).cmd

window.navigate(cmd)

}

and replace it with this one

function Do(obj) {

var cmd = eval(obj).cmd

//window.navigate(cmd)

parent.frame1.src = cmd;

}

prety sure this will do it

?
Copy linkTweet thisAlerts:
@DrDaMourApr 18.2003 — in your casscademenu.js there is this function

function Do(obj)

{

var cmd = eval(obj).cmd

window.navigate(cmd)

}


change it to

function Do(obj)

{

var cmd = eval(obj).cmd

var fra = eval(obj).target

parent.frames[fra].location.href = cmd;

}


and then in every menu itme to target="Frame1" and watch your capitalization!
Copy linkTweet thisAlerts:
@DrDaMourApr 18.2003 — ha, khal mine was better, nah nah nah nah, and she had her frames names Frame1 & Frame2 not frame1 & frame2...
Copy linkTweet thisAlerts:
@zazaauthorApr 26.2003 — TNX!! you guys are great!?
Copy linkTweet thisAlerts:
@zazaauthorApr 26.2003 — okay... I've changed it, and the links open in the right frame now... but the submenus don't open under the menu, but next to it... that happens all the time when I change something in the js file... is that some kind of protection code or something??
×

Success!

Help @zaza spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...