javascipt help please!
- Started
- Last post
- 5 Responses
- Baskerville
I've new to java and have some code that I'm using for a tree style menu system.
I have all my links which all look very nice in the tree in different subfolders etc.
the code for a link looks like:
d.add(0,1,'label','example.html...
where 'label' is the text for the link you see in the menu and 'example.html' is the page the link points to.
at the moment when clicked on the link opening the the same page.
I have now put the menu into a frameset where it is on the left-hand frame and the right-hand frame is the content. How do I ammend the above piece of code so that the link opens in the right-hand frame (named "content" in the frameset)
- acescence0
we'll have to see more of the code than that. can you post a link to the page? or post the code here:
- Baskerville0
oops, don't know what you need to see but you can see an online example of the menu system that I'm adapting here:
http://www.destroydrop.com/javas…
the source code is roughly the same. Essentially I want the links to open in another frame. Not the 'folders' just the links
- acescence0
where you instantiate the menu, add:
d.config.target = "yourtarget";
- acescence0
or you can change the target for each link by adding the target argument as detailed here:
- Baskerville0
thanks so much acescence! that's awesome, I can't believe how simple that was.
I'm going to pick up a book on javascript along with some other much needed books. I'm kind of winging it for now, but the learning curve is great, everyday I work out something new, that is probably really obvious to everyone else but gives me satisfaction, it's quite addictive.Compare to print, where I know how to make everything, web is much more interesting at the moment.
Well thanks again, I'll probably pop up again with more silly questions