SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
Thread: Dreamweaver question
-
Nov 5, 2003, 11:04 #1
- Join Date
- Apr 2002
- Location
- Aberystwyth, UK
- Posts
- 1,355
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Dreamweaver question
I have a friend who is building a site in dreamweaver, he has about 8 categorys in the nav and each category has about 6 sub categories.
He wasnt sure how to implement the nav in the best way, so I suggested using an expanding nav, when someone clicks a category link, the box opens up with more links underneath it.
However we couldnt find how to do this in dreamweaver, using templates is it possible? The site has to be managed by someone using contribute and we dont want to use anything like javascript or DHTML.
Thanks• Search & Rescue Aberystwyth Lifeboat
• CSS Tutorials/Guides
Sitepoint signatures are not visible to Search Engines More info
-
Nov 5, 2003, 11:55 #2
- Join Date
- Oct 2003
- Location
- USA
- Posts
- 173
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Nov 5, 2003, 12:13 #3
- Join Date
- Apr 2002
- Location
- Aberystwyth, UK
- Posts
- 1,355
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yeah it supports the majority of scripting languages and I did think of using a simple php script to do it for him
However the management of the site is going to be passed over to someone else, who is going to use most likely Contribute or dreamweaver to manage it. This means that if they wanted to add a new link it would mean they had to know what to add.
Or the site would start becoming a full blown CMS which then starts getting out of hand!!• Search & Rescue Aberystwyth Lifeboat
• CSS Tutorials/Guides
Sitepoint signatures are not visible to Search Engines More info
-
Nov 5, 2003, 18:43 #4
- Join Date
- Dec 2002
- Posts
- 386
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
is there any reason why you don't want to use js?
If you use unobtrusive dhtml then all that you would need in the html would be simple nested lists with some ID tags hung on them.
Then in the JS add some listeners for those IDs...
also in the js you could set it up so that the menus contract on load (depending upon cookies) hence making the menus appear opened if someone browses the site with js disabled.
You can also do something very similar with css, but the amount of control decreases when you have to support legacy browsers... You can have very effective menus even using IE, but if you want to have expanding contracting ones then ie doesn't support enough css.
-
Nov 6, 2003, 04:53 #5
- Join Date
- Apr 2002
- Location
- Aberystwyth, UK
- Posts
- 1,355
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
They dont want to use JS, because the site they are building has to be cross compliant with a lot of browsers and users, and a lot of people will have the JS turned off. Therefore the open nav, will take up about 3 screens of navigation which wil look awfull.
I think they will probably be forced down the PHP route.• Search & Rescue Aberystwyth Lifeboat
• CSS Tutorials/Guides
Sitepoint signatures are not visible to Search Engines More info
-
Nov 6, 2003, 09:09 #6
- Join Date
- Jun 2003
- Location
- ether
- Posts
- 4,497
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
But a good approach will be to use JavaScript only. If you are using DreamweaverMX(any) then there's an option of pop-up menu in the behaviours section. Just select a link & open behaviours panel in the Windows Menu. Click on the (+) sign & select the show pop-up menu.
I haven't checked it for cross-browser compatibility but you can handle that in PHP.
The pop-up menu behaviour uses layers. So you can check if the browser is IE then you can use the <DIV> tag or else use a <LAYER> tag.
Also there are quite a few cross-browser DHTML menus available at http://www.dynamicdrive.com.
If what you say is true(lots of categories with sub-categories) then I don't know how you are going to manage without using JavaScript.Our lives teach us who we are.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Me - Photo Blog - Personal Blog - Dev Blog
iG:Syntax Hiliter -- Colourize your code in WordPress!!
-
Nov 6, 2003, 16:51 #7
- Join Date
- Dec 2002
- Posts
- 386
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by asp_funda
Apart from being a nightmare to code, try explaining to the users that they have to add new content twice, once for a layer and once for a div.
If one uses good standard js/dhtml one can code for everybody and leave a good experience for those with browsers which do not understand js. The old days of testing for browsers and serving up nine different code forks should be over, but some people still think this is the only way to go. This type of thing is not only not necessary but harmful, in fact probbaly why so many people are wary of JS.
The original poster mentioned that a problem with using a js solution which defaults (in case of no js) to all menus open would lead to too many options available at the top level... one way around this would be to use CSS to close up all but the menu on the current page, (you could also set the css to act like the js menu but only in modern browsers like mozilla, opera, and safari) giving your users more options than just the top level links, but not all at once...
-
Nov 7, 2003, 09:19 #8
- Join Date
- Jun 2003
- Location
- ether
- Posts
- 4,497
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by pissant
Following is the ASP/VBScript code. You can change it to your language
accordingly.
Code:<% If (strBrowser = "IE") Then Response.Write("<DIV id='myMenu'>") ElseIf (strBrowser = "NN") Then Response.Write("<LAYER id='myMenu'>") End If %> ---- your menu contents here ----- <% If (strBrowser = "IE") Then Response.Write("</DIV>") ElseIf (strBrowser = "NN") Then Response.Write("</LAYER>") End If %>
.
And besides every cross-browser DHTML Menu does that. The only difference is that it checks for the browser at client-side & you are gonna check the browser at server-side.Our lives teach us who we are.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Me - Photo Blog - Personal Blog - Dev Blog
iG:Syntax Hiliter -- Colourize your code in WordPress!!
-
Nov 8, 2003, 08:52 #9
- Join Date
- Dec 2002
- Posts
- 386
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by asp_funda
Personally if I have to test for compatability I prefer to test for the browsers ability eg
Code:if document.getElementByID do x if document.all do y if document.layers do z
Maybe it is just me but as well as separating precentation from content (something which your above example manages not to do) I also believe in separating behaviour from content. This allows greater ability for the CM to add new content without worring about breaking the scripts.
Of course if one does still have to support legacy browsers like NN4.x then one will still need some event handlers in the document. However in combination with CSS much is possible without having to resort to locking out ANY users. This includes users of lynx to PDA and telephone users.
It is of course just my opinion but I personally think anyone still writing browser detect scripts which look for particular browser name is being irresponsible or unprofessional.
-
Nov 8, 2003, 09:32 #10
- Join Date
- Jun 2003
- Location
- ether
- Posts
- 4,497
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by pissant
What works in NN4 or 5 will definitely work in NN6+ unless Netscape decides to bring out drastic changes & declaring that it will stop supporting things that were supported in previous versions.
Originally Posted by pissant
Originally Posted by pissant
Our lives teach us who we are.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Me - Photo Blog - Personal Blog - Dev Blog
iG:Syntax Hiliter -- Colourize your code in WordPress!!
-
Nov 8, 2003, 22:58 #11
- Join Date
- Dec 2002
- Posts
- 386
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by asp_funda
Originally Posted by asp_funda
Originally Posted by asp_funda
I did of course say that browser detection using names and types of browsers, checking for capabilities is a much better way to work.
above you said that nothing would happen, and your script would work fine for users of other browsers, please explain to me how that could happen, as unless I am missing something a mozilla user (for example) would go to your page, the script would say is it IE? no. Is it NN? no. Then it would stop, do nothing and the mozilla user would be locked out.
Maybe I'm missing something, but sometimes when old practices no longer fit the way things are done now, or the current climate, they have to be set aside and new better practices adopted.
Personally I am sick of going to webpages and finding out that some fool has written a browser sniffer which locks my browser out despite the fact my browser can actually run the scripts, it just doesn't have the correct name. Perhaps your detects ARE good and work, but I do not see why looking for the name of a browser rather than testing what it understands could be better.
-
Nov 9, 2003, 02:37 #12
- Join Date
- Jun 2003
- Location
- ether
- Posts
- 4,497
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by pissant
).
But as I suggested above, if the menu is made with DreamWeaverMX or FireworksMX, it works fine in both IE & NN without any modifications to the code as I suggested or for that matter you suggested. There are also many cross-browser menu scripts available at http://www.dynamicdrive.com. I am attaching 6sample scripts of drop-down menus from DHTML Central at http://www.dhtmlcentral.com. All of them(except 6th one) works fine with both IE5+ & NN6+(I have tested on these only).
Also as asked by hotnuts21 above, I said that DHTML would be their best choice & I still say it, unless you or anyone can tell me how that nav bar can be implemented without causing any pain to the common visitor to the website.Our lives teach us who we are.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Me - Photo Blog - Personal Blog - Dev Blog
iG:Syntax Hiliter -- Colourize your code in WordPress!!
Bookmarks