Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:23
Frames and V5
Poster: fredlongworthhighschool
Dated: Friday July 25 2003 - 8:50:41 BST
I've been using the v3 frames menu system for a while now and been very happy.
But, I intend to move to v5 as soon as possible. Is there a normal frames version which would mean as little change to my already-created pages as possible, or is IFRAMES the only option?
I've not used IFRAMES before so I don't know how much change would be needed of my pages.
Thanks
Poster: Hergio
Dated: Friday July 25 2003 - 16:10:18 BST
I havent seen an example of the new menu with frames, but iframes aren't that bad of a choice to start using. Think of an iframe as an image that you can place anywhere on the page. You can control its position, its width and height, its visibility, all the good stuff you can do with images. But the neat thing, is you can change its source, and the source doesn't have to be a image file, it can be a URL. The V5 version of the menu, at least on IE5.5+ I believe, renders over the top of iframes with ease. Any links on your page or menu can specify a target attribute which would be the name of the iframe so it updates in the iframe.
I would recommend changing it over. Ohterwise, wait for an example from Andy.
Poster: fredlongworthhighschool
Dated: Monday July 28 2003 - 8:25:47 BST
I'll have a play around with it and see how it goes. In theory it does sound much better than using the usual two frames.
The demo shows the Google page. However, if I click on a link it opens it in a new page.
What do I need to do to get the page to open up in the IFRAME window? and where does it need to be done - in the IFRAME_DATA.JS?
Poster: fredlongworthhighschool
Dated: Monday July 28 2003 - 12:22:19 BST
Figured it!
It was just a case of naming the IFRAME (eg: fred)
and then in the iframe_data.js file putting
Code:
;target=fred
after the URL.I'm having a few problems with scrolling though. If if opens a page which is quite long, I get TWO scroll bars - one on the right hand side of the page and another in the actual IFRAME.
I need to get rid of the inside one, i guess it would have something to do with my IFRAME properties. At present they are:
Code:
<iframe width=100% height=100% id=iframe1 name="fred" src=main/body.htm align=top:center frameborder=0 hspace=0 vspace=0 scrolling=auto>
</iframe>
</iframe>
Whats the difference between "ID" and "NAME"
Poster: Hergio
Dated: Tuesday July 29 2003 - 11:48:45 BST
ID is the way that the page, mainly any javascript, would reference that object. Like, if you wanted to click a button to make the iframe disappear and the frames ID is iframeID1, then you would say iframeID1.style.display = "none";. That type of thing.
Name is for linking and forms submission. When you click a href, the target should be the name of the (i)frame that you want it to appear in. Also, if you have a text box with a name of textboxname1, then when you submit that form and want to pull the results out of the URLstring or using the ASP command Request("textboxname1") thats what you'd use name for. I think I am correct in all this.
I've also had alittle trouble with iframes showing my a scroll bar on long pages. I try and set the vertical height to different things and can't seem to get a nice thing going. If anyone has figured out iframes well enough to get rid of the scrollbar bug(?), please do post a reply. Hopefully I will stumble across the answer as I work with them more.
Poster: fredlongworthhighschool
Dated: Tuesday July 29 2003 - 11:56:48 BST
Have you got an example of your site on-line?