PDA

View Full Version : Direct menu to open in frame



minimustangs
07-31-2008, 06:10 PM
1) Script Title: Omni Slide Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm

3) Describe problem: Make link open in frame, not new page.

The way I have the site set up, the menu sits in a frame. When a visitor click on a link I was the page to open in that same frame, not a new page. Is this possible? I've tried several of the tage modifiers ( _blank, _parent, _self, _top) and the menu isn't generating a page in the manner I'm hoping for. I'm sure I'm just missing something minor. A working version of the page can be found at:

www.dywsc.com/omnislideframe.htm

I'm wondering if I'm going to have to kludge this by adding the menu code to eachpage..

Again, thanks for the read..

Steve

jscheuer1
07-31-2008, 06:22 PM
You don't mean here do you?


menuItems:[ // REQUIRED!!
//[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
["DYWSC.COM"], //create header
["DYWSC Home", "http://www.dywsc.com/home.htm", "_new"],
["Events", "http://www.dywsc.com/events.htm", "_new"],
["Permits", "http://www.dywsc.com/permits.htm", "_new"],
["Photos", "http://www.dywsc.com/photos", "_new"],
["Links", "http://www.dywsc.com/links.htm", "_new"],
["Contact Us", "http://www.dywsc.com/links.htm", "_new"]
]}; // REQUIRED!! do not edit or remove


If you just leave the target field empty, it will open in the same frame/window for most pages. Frames are the same as windows for linking purposes. Or you could use _self in place of _new. That would even override a base target for the page, if you have one.

However, if you change the code in the script file, you may need to clear your browser's cache after leaving the page before its effects will be seen.

One thing you cannot do though is open a page in a frame if that page 'breaks out of frames'. But in a case like that, it would still open in the same window.

minimustangs
08-01-2008, 01:55 PM
If you just leave the target field empty, it will open in the same frame/window for most pages. Frames are the same as windows for linking purposes. Or you could use _self in place of _new. That would even override a base target for the page, if you have one.

However, if you change the code in the script file, you may need to clear your browser's cache after leaving the page before its effects will be seen.

One thing you cannot do though is open a page in a frame if that page 'breaks out of frames'. But in a case like that, it would still open in the same window.

Thanks John for responding. I ended up using _self. I discovered though I had to put the navigation menu code on each web page to give the appearance that the navigation was anchored to the left side of the screen, since clicking a link generates a new page and makes the nav mneu "dissapear". I'm comfortable with the way this works, and chances are only people like yourself will even know.. :)

Steve