Show 1 div with PREV - NEXT link, hiding all others, Show 1 div with PREV - NEXT link, hiding all others |
Show 1 div with PREV - NEXT link, hiding all others, Show 1 div with PREV - NEXT link, hiding all others |
Baffled in Baltimore |
Jan 9 2009, 05:29 PM
Post
#1
|
Member Group: Members Posts: 51 Joined: 9-January 09 From: Baltimore, MD Member No.: 7,507 |
First, thank you for your patience and please forgive the lengthy blurb. This is a bit complicated, but I am sure there is a fix.
My website is heavily CSS structured for layout and styles for its Side-bar, heading, menu, etc. A modified CSS is used for the content and the content section is now an Iframe where all content is targeted. This was done to prevent duplication of parent. I am using GOOGLE site-map generator for the web and FreeFind for my site. Site consists of hundreds of HTML each consisting of an Image linked to a bigger image, Content, PayPal Links and other content all created with Excel for the code, Nvu for the file-saves and HTMLToolkit for the previews and error checking. When someone clicks an image anywhere on the site, it opens the HTML associated with it giving all the information about the Image. By the way, they are all table-based pages; DUMB, I know. The Problem: All these pages require updates or deletions depending on stock and pricing for any given item and frequent crawler checks for broken links afterwards. My site Spiders at roughly 500 pages and it keeps growing and getting out of hand. HELLLLLP!!!! On a more personal note; the author of the website (that’s me) is loosing his vision and can no-longer keep-up with this maddening effort… Proposed solution: I believe that enclosing all images and their associated content in DIVS is the better way to go. The idea is to have all images along with its content on one HTML. There are different categories that would use their own pages but the goal is to remove those hundreds of HTML pages and replace them with maybe a couple of dozen Category pages instead. There are as few as 1 or 2 items to as many as 100 items for any given category that would be shown 1-at-a-time using PREV - NEXT links. What I would like to accomplish is;
Whew!!! I told you it was complicated. Any assistance on setting this up (show 1 and hide the rest) is greatly appreciated. CHEERS This post has been edited by Baffled in Baltimore: Jan 9 2009, 05:56 PM |
Baffled in Baltimore |
Jan 16 2009, 05:22 PM
Post
#2
|
Member Group: Members Posts: 51 Joined: 9-January 09 From: Baltimore, MD Member No.: 7,507 |
Hi ALL...
I realize this is off-topic; during a recent dr visit, I was thinking of replacing the iframe scheme on my site by using divs for targeting multiple html. It is realized that many browsers don't render iframes and is the reason I would like to go with something more browser-friendly. Below is something similar to what I am using and would like to replace; CODE <a href="java script:" onclick= " frame1.location='page1.html'; frame2.location='page2.html' "> Link</a> <iframe id="frame1"></iframe> <iframe id="frame2"></iframe> As can be seen, it is a simple Javascript "onclick" event. I used this scheme for a Portfolio Website I put together for one of my classes in College a few years ago so it was used here. Any assist with this is appreciated; and THANKS This post has been edited by Baffled in Baltimore: Jan 16 2009, 05:57 PM |
Christian J |
Jan 17 2009, 07:09 AM
Post
#3
|
. Group: WDG Moderators Posts: 9,686 Joined: 10-August 06 Member No.: 7 |
I was thinking of replacing the iframe scheme on my site by using divs for targeting multiple html. Using DIVs how? QUOTE It is realized that many browsers don't render iframes and is the reason I would like to go with something more browser-friendly. Almost all browsers support iframes today. They still cause problems, though: http://htmlhelp.com/faq/html/frames.html#frame-problems QUOTE Below is something similar to what I am using and would like to replace; CODE <a href="java script:" onclick= " frame1.location='page1.html'; frame2.location='page2.html' "> Link</a> <iframe id="frame1"></iframe> <iframe id="frame2"></iframe> To make a single link change two framed pages without JS, you must load a new parent page with new iframe SRC values. |
Baffled in Baltimore |
Jan 17 2009, 01:15 PM
Post
#4
|
Member Group: Members Posts: 51 Joined: 9-January 09 From: Baltimore, MD Member No.: 7,507 |
I may know-enough about web-design to squeak by, but not enough to make it right...
QUOTE Using DIVs how? An iframe was adopted for the "Main Content" because I don't know how to target DIVs the way an iframe can be targeted. The objective is to "Click a Link" to call pages, targeting the "Main Content" "Sidebar content" "Header" content" All defined for style and layout using a CSS file; which is irrelevant because ONLY style and layout are pre-defined, not content.. QUOTE Almost all browsers support iframes today. They still cause problems, though: Yes they do; The operative word is "Almost" But what scheme supports them ALL? None that I'd imagine. Some are still using dinosaur browsers. QUOTE To make a single link change two framed pages without JS, you must load a new parent page with new iframe SRC values. All this will do is make more pages. Why do this if the style sheet in use and some smart coding can be used. I am trying to get rid of the iframes, not create more pages using them.The point is targeting a few named divs with alternate content when a link is used elsewhere on the same page. The Header section will be especially necessary for the Catalog pages as there are many uniquely-named sections. Targeting the Header with a given pages title would be a plus. I realize that using JS for this has its risks, but they should be minimal and controllable. Thanks in advance. |
Christian J |
Jan 18 2009, 07:23 AM
Post
#5
|
. Group: WDG Moderators Posts: 9,686 Joined: 10-August 06 Member No.: 7 |
An iframe was adopted for the "Main Content" because I don't know how to target DIVs the way an iframe can be targeted. Javascript seems to be the only option here... QUOTE The objective is to "Click a Link" to call pages, targeting the "Main Content" "Sidebar content" "Header" content" Will the Sidebar and Header always be the same, or will their content change depending on which JS-link that was clicked? (Main Content will of course change.) * If Sidebar and Header never change, you might make a single page and only change its Main Content with JS. * If Sidebar and Header change in just a few predictable ways, you could make separate pages for each combination. * If Sidebar and Header change in a multitude of ways, you may have to create them with JS. QUOTE QUOTE Almost all browsers support iframes today. They still cause problems, though: Yes they do; The operative word is "Almost" But what scheme supports them ALL? None that I'd imagine. Some are still using dinosaur browsers. My guess is the ones without iframe support are roughly as many (or the same browsers) as the ones without JS support. Which of the two methods that has the least usability problems may vary from case to case. QUOTE I realize that using JS for this has its risks, but they should be minimal and controllable. One basic fallback is to provide a HTML link to the index page on all other pages. The index page must then contain an HTML menu, header etc, and when you make updates you must change both this page and the JS file. |
Baffled in Baltimore |
Jan 18 2009, 11:19 AM
Post
#6
|
Member Group: Members Posts: 51 Joined: 9-January 09 From: Baltimore, MD Member No.: 7,507 |
QUOTE Javascript seems to be the only option here... Without server-side functionality, this was a given.QUOTE Will the Sidebar and Header always be the same, or will their content change depending on which JS-link that was clicked? (Main Content will of course change.) Content - AlwaysHeader - Mostly Sidebar - 2 or 3 for Catalog Navigation (in build). Probably the best analogy I can think of is a book. A service manual for sectionalized test equipment; say an oscilloscope main-frame, its vertical amplifier section and its time-base generator section. Each section has its own index, topics, sub-topics, chapter headings, etc. the Main Index identifies the others and vice versa. QUOTE My guess is the ones without iframe support are roughly as many (or the same browsers) as the ones without JS support. Which of the two methods that has the least usability problems may vary from case to case. It isn't only browser compatibility; it is primary factor, but planning ahead too. I am currently using HTML TRANSITIONAL 4.01 DTD. At some point, I would like to publish under XHTML STRICT DTD. I know that under this standard, rendering is more uniform due to its strict coding requirements. Iframes don't do well here so they have to go. (or have I miss-read the requirements?) Just softening the blow when I go to W3Cs' Validation site. The change-over may, or may not happen; depends on functionality of site when modified. QUOTE One basic fallback is to provide a HTML link to the index page on all other pages. The index page must then contain an HTML menu, header etc, and when you make updates you must change both this page and the JS file. This too is a given and to keep page-count to minimum. There are enough support files to target as it is. (mostly html and some js for other functions.)This post has been edited by Baffled in Baltimore: Jan 18 2009, 11:42 AM |
Lo-Fi Version | Time is now: 13th June 2024 - 11:01 PM |