M
Mark Preston
Its perhaps a bit early to ask, since I'm still doing the page design
and haven't got down to the coding yet, but I wonder if anyone can help
with a bit of a question. To lay the groundwork, a quick description of
the template design for the pages:-
1. There will be a body section of the page consisting of a set of <div>
layers. The top level layers will all have the same CSS class to ensure
a common design look.
2. At the side or top of the page (not yet decided) there will be a
small number of navigation text phrases. These will be set up as
<a>ddress tags to that they can have events attached.
3. The events on the navigation menu will be "onClick" events and will
switch the layer they refer to to be visible (and the others to be
invisible, obviously).
4. The reference on the address tags should, I know, be of the form
"href='javascript:;'" to prevent page reloads when clicking on the menu
option since I have an "onLoad" event to set up the basic page. No
problem here - I've made pages like this loads of times.
5. Now comes the fun bit... I want the pages to be fully accessible to
anyone at all (which is why the menu is text rather than images in the
first place). That has to include people who do not have
JavaScript-enabled browsers.
So - I will start loading the page with all the <div> layers visible
(the onLoad event will switch off those not initially in use). These
will switch in and out of visibility for browsers using JavaScript. For
those who don't use JavaScript, the page will display with all layers
visible, of course, and for these users the menu options should go to
anchor points at the top of each top-level layer section.
Now - the question is, how can I use anchor points (of the form
"href='#anchorname'" and yet still prevent page-reloads when the menu
option is selected? I know that some browsers will not do page reloads
anyway, but I need to be sure that none will. Any ideas?
and haven't got down to the coding yet, but I wonder if anyone can help
with a bit of a question. To lay the groundwork, a quick description of
the template design for the pages:-
1. There will be a body section of the page consisting of a set of <div>
layers. The top level layers will all have the same CSS class to ensure
a common design look.
2. At the side or top of the page (not yet decided) there will be a
small number of navigation text phrases. These will be set up as
<a>ddress tags to that they can have events attached.
3. The events on the navigation menu will be "onClick" events and will
switch the layer they refer to to be visible (and the others to be
invisible, obviously).
4. The reference on the address tags should, I know, be of the form
"href='javascript:;'" to prevent page reloads when clicking on the menu
option since I have an "onLoad" event to set up the basic page. No
problem here - I've made pages like this loads of times.
5. Now comes the fun bit... I want the pages to be fully accessible to
anyone at all (which is why the menu is text rather than images in the
first place). That has to include people who do not have
JavaScript-enabled browsers.
So - I will start loading the page with all the <div> layers visible
(the onLoad event will switch off those not initially in use). These
will switch in and out of visibility for browsers using JavaScript. For
those who don't use JavaScript, the page will display with all layers
visible, of course, and for these users the menu options should go to
anchor points at the top of each top-level layer section.
Now - the question is, how can I use anchor points (of the form
"href='#anchorname'" and yet still prevent page-reloads when the menu
option is selected? I know that some browsers will not do page reloads
anyway, but I need to be sure that none will. Any ideas?