Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Show 1 div with PREV - NEXT link, hiding all others

Posted by: Baffled in Baltimore Jan 9 2009, 05:29 PM

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;

When an item is no longer available, it is deleted from my data-base and the affected page amended to read “Item is no longer available”. This would be done by selecting appropriate “Item Status” in Excel for compilation of the page. If a deleted item is searched for, it will merely show this instead of a broken link associated with a missing webpage.

Whew!!! I told you it was complicated. Any assistance on setting this up (show 1 and hide the rest) is greatly appreciated.

CHEERS

Posted by: Darin McGrew Jan 9 2009, 06:13 PM

Your proposed solution is basically using one big HTML document as a database. I suggest that you'd be better off just switching the site from static HTML documents to a database-driven site.

One of these http://cgi.resourceindex.com/Programs_and_Scripts/Perl/Shopping_Carts/ or these http://php.resourceindex.com/Complete_Scripts/Shopping_Carts/ may meet your needs.

Posted by: Baffled in Baltimore Jan 9 2009, 07:51 PM

Thank you for your response
I am going blind from a motorcycle accident that caused nerve damage and as a result, I have to do thyings differently.

No, not one-big HTML; this would be totally wrong. The issue is not data access either, it is running div'd content on a hand full of pages as opposed to running many pages.

What I am proposing is placing items in divs by category, with each category being a page of its own. There may be 20 categories (pages) altogether.

In other words, 1, 2, or ,maybe 20 current HTML items (pages) now become 1-page of div'd content. This would be far more manageable than trying to keep up with several hundred individual pages and to stream-line things

When 1 item (div) of say; 20 on the same page is selected, the rest of the div'd items remain hidden. This is where I need help, hiding the rest when 1 is selected and doing so using a couple of links.

When another div'd item is selected by using a Next or Prev link, it closes the visible content and opens the new selection; hiding the rest of them again.

How is the code for this written? I tried researching this but have too much trouble seeing

Thanks again

Posted by: Darin McGrew Jan 9 2009, 08:02 PM

There are JavaScript techniques for hiding some of the content on a page.

However, I think it's better to use a database-backed system to generate different content at different URLs, rather than to have a single URL with multiple views depending on what JavaScript is doing.

Posted by: Frederiek Jan 10 2009, 06:35 AM

To see a javascript driven sample, go read ALA's article http://www.alistapart.com/articles/eatcake.

Posted by: Baffled in Baltimore Jan 10 2009, 11:30 AM

I am an American Vet, now with a disability.
Like so many other articles I read long ago, Let them eat cake appears to be a great article and just what the doctor ordered; but my vision prevents me from reading much of it (or anything else) at a time. Speech to text is not a good tool for this one.

I hate to be a thorn, is there usable HTML and/or CSS code I can just copy and tweek to my needs? I can author it to some degree thru a mic and what sr doesn't understand, I will have to visually scribe.

Thanks again for your help


Posted by: Christian J Jan 10 2009, 11:40 AM

Here's a simpler alternative to a database, using PHP to show different parts depending on the query string. Just be careful with the single-quotes, since one missing or one too many will break it (single quotes that are part of the content can be commented out with a backslash as shown at the end):

CODE
<?php

if(isset($_GET['section']) && $_GET['section']=='foo')
{
    echo '
    <h1>Section foo</h1>
    <p><a href="?section=bar">Next</a></p>
    ';
}

else if(isset($_GET['section']) && $_GET['section']=='bar')
{
    echo '
    <h1>Section bar</h1>
    <p><a href="?section=foo">Previous</a></p>
    ';
}

else
{
    echo '
    <h1>No section is chosen</h1>
    <p><a href="?section=foo">foo\'s page</a> <a href="?section=bar">bar\'s page</a></p>
    ';
}

?>


A related solution is to put the section's content in an external HTML page, separated by pre-determined "divider" strings:

CODE
#divider#

Section foo

#divider#

Section bar

#divider#


Then that HTML page's content is read by a PHP script, which divides the content into sections (using the #divider# separator), only showing one of them at the time depending on the query string.

To maintain the HTML page you can then use any HTML editor, as long as the #divider# separators are used correctly.

Posted by: Baffled in Baltimore Jan 10 2009, 02:23 PM

Thanks again for your help

I appreciate the code and the assist, but I believe there is some discontinuity to the objective.

When I started the website many-moons ago, I began writing the pages 1-at-a-time; but (this was already a given) this would be too prone to errors and inconsistencies. Lacking support, resources and a better way to go, I went to Excel for this purpose because there is a lot of repitition that I knew Excel would be good at. (I'm an old LOTUS user from the 80's)

Using the VB tools in Excel, I wrote some code to help automate the process of writing the HTML for me. I maintain a database in one workbook that is used as the Master Record and new record input. The HTML code is written in another workbook with many variations that references the Master records; this was done to prevent data loss in the event something happens. It worked well enough to be able to author, test and debug dozens of pages at a time, ready for upload in about an hour and have been using this method until recently.

I realized then that maintenance would be a problem and I was ok with that. But in light of my recent disability, I can no longer spend the time for basic upkeep; this is why I am trying to eliminate the need for having to upload and maintain MANY pages. Once this is done, there will be only a hand-full of pages to maintain instead of a truck load (the hundreds of pages that will be removed later).

The information is already there, I just need a way to display it without being overwhelming or senseless. Instead of writing them with the full html script, it will be (for the most part) content that will go inside the BODY tags.

Please consider the following Example for clarification:

I have one html page with 20 div'd sections all showing their content. Contents are; 1001, 1002, 1003, etc to 1020. Each divd section is garnered from previously uploaded pages; twenty of them in this case.

The goal is to have the first div'd section on this page show by default when the page loads, hiding the rest of them. Along with this, have one link to show previous section (if already shown, link is disabled) hiding all others and a link to show the NEXT section, hiding all others. If the last div'd section is already shown, the NEXT link is now disabled.

Please keep in mind, this all happens on the given page; not involving any others unless specifically called by another link...

I suppose a better question is; how do I set up my divs, and the links. I know main or master divs need a unique id for this but not sure how to structure them. Once this is accomplished, it is just a matter of changing a bit of code in Excel to re-compile them.

Thank you again for the help...

Posted by: Baffled in Baltimore Jan 10 2009, 03:13 PM

By the way, a database structure sounds sweet but not set up for it; don't know how...

Posted by: Christian J Jan 10 2009, 05:15 PM

QUOTE(Baffled in Baltimore @ Jan 10 2009, 08:23 PM) *

Please consider the following Example for clarification:

Yes that's what I had in mind with my example(s). Using a server-side script like PHP avoids any browser support problems inherent with Javascript, and also saves the user download time (since when using JS, all the DIVs are downloaded at once).

Posted by: Baffled in Baltimore Jan 10 2009, 06:02 PM

Thanks again.

Just wanted to make sure I was on the same sheet of music.

This php is unfamiliar to me, how do I put it to actual use?
Any sample html I could try?
What if anything would I have to upload to make it work?

When I mentioned my Excel database, would this be something for uplad; if so, should it be saved as an XML and uploaded as such?

Sorry for all the dumb questions; I'm just trying to simplify things for myself and php sounds like a very good method.
Given my disability, I now see that it may be the only way.

Posted by: Christian J Jan 10 2009, 07:48 PM

QUOTE(Baffled in Baltimore @ Jan 11 2009, 12:02 AM) *

This php is unfamiliar to me, how do I put it to actual use?

PHP is a server-side scripting language, so the user/browser never sees the script, only its output. This forum is made with PHP. Here's the official site: http://www.php.net/ (the introduction is at the top left).

QUOTE
Any sample html I could try?

Assuming your web host offers PHP (most commercial ones do) you can paste my first code example into the BODY of a web document and upload. You may have to use a .php file extension, dependning on how your web server is configured (this can easily be changed so it works with the .html extension too).

QUOTE
When I mentioned my Excel database, would this be something for uplad;

The processing of the PHP code is done on the server, so you can't view the finished pages offline (i.e. from your computer's file system). I don't know how various HTML editors treat PHP code (ideally they'd leave it as is), I wouldn't trust Excel not to mess things up. OTOH, if you used my second idea (with all content in a separate HTML document) you'd "never" have to touch the page with the PHP script after first writing it, since all section updates would be made in the other page.

Posted by: Baffled in Baltimore Jan 11 2009, 09:26 AM

Hello again;

Based on the sample code (php script), how would an external file for the divider sections be named to make the script work?

Thanks again for your help.

Posted by: Christian J Jan 11 2009, 10:43 AM

With an external file you'll need a different script. Note that this could be buggy, it's just to show the concept:

CODE
<body>

<?php

// content of the remote HTML page:
$content=file_get_contents('content.html');

// divide HTML page content into sections, separated by the string "#separator#":
$section=explode('#separator#', $content);

// last item of two or more:
if(isset($_GET['section']) && count($section)>3 && $_GET['section']=='100'.count($section)-2)
{
    echo $section[(count($section)-2)].'
    <p>
    <a href="?section=100'.(count($section)-3).'">Previous</a>
    Next
    </p>
    ';
}

// items between the first and last:
else if(isset($_GET['section']) && $_GET['section']>1001 && $_GET['section']<'100'.count($section)-2)
{
    for($i=2; $i<(count($section)-2); $i++)
    {
        if($_GET['section']=='100'.$i)
        {
            echo $section[$i].'
            <p>
            <a href="?section=100'.($i-1).'">Previous</a>
            <a href="?section=100'.($i+1).'">Next</a>
            </p>
            ';
        }
    }
}

// first item of two or more:
else if(count($section)>3)
{
    echo $section[1].'
    <p>
    Previous
    <a href="?section=1002">Next</a>
    </p>
    ';
}

// single item:
else
{
    echo $section[1].'
    <p>
    Previous Next
    </p>
    ';
}

?>

</body>


The external page called "content.html":

CODE
<body>

Put no content here (before the first separator). If this line of text shows up something went wrong.

#separator#

<h1>1001</h1>
<p>Lorem ipsum</p>

#separator#

<h1>1002</h1>
<p>Lorem ipsum</p>

#separator#

<h1>1003</h1>
<p>Lorem ipsum</p>

#separator#

<h1>1004</h1>
<p>Lorem ipsum</p>

#separator#

Put no content here (after the last separator). If this line of text shows up something went wrong.

</body>


Posted by: Baffled in Baltimore Jan 11 2009, 11:27 AM

Hello again; and thanks for your patience.

I uploaded recent samples with the following results:

CODE

3 && $_GET['section']=='100'.count($section)-2) { echo $section[(count($section)-2)].'
Previous Next

'; } // items between the first and last: else if(isset($_GET['section']) && $_GET['section']>1001 && $_GET['section']<'100'.count($section)-2) { for($i=2; $i<(count($section)-2); $i++) { if($_GET['section']=='100'.$i) { echo $section[$i].'
Previous Next

'; } } } // first item of two or more: else if(count($section)>3) { echo $section[1].'
Previous Next

'; } // single item: else { echo $section[1].'
Previous Next

'; } ?>


This is a copy/paste of the screen output. I see what you mean by it being "Buggy" The first section was saved as .php and .html; with and without html elements (body, dtd. etc) with similar results. The Content sect was saved as content.html


Any thoughts on this, or is server php-deficient?

Thanks again...

Posted by: Christian J Jan 11 2009, 03:02 PM

QUOTE(Baffled in Baltimore @ Jan 11 2009, 05:27 PM) *

I uploaded recent samples with the following results:

If that's how it looks online your web server may not support PHP. Your web host should have a list on what's included in the account plan.

Possibly the web host offers ASP instead, then maybe something similar can be programmed in ASP, but alas I don't know that language. Free hosts usually don't support any of this.





Posted by: Baffled in Baltimore Jan 11 2009, 04:43 PM

Thanks for reply

Well, I'm paying for this stuff; you'd think they'd give me something useful. I contacted support for this and will wait for their response.

I have an ftp account I opened shortly after this one. I was not too happy with this host after I bought into it. I use the ftp less frequently; mainly file access for visitors who get a log-in to access certain docs. Maybe it's time to move over to it full-time.

Either way I go, I still need to minimize my efforts in maintaining all that html; and removing most of it. Each visit to the VA brings more bad news about my vision.

In the mean time, I need to move back over to the original idea of using jscript and divs; it would be a big improvement over what's being done now.

Can you provide sample script / html for the purpose at hand?

Ordinarilly I'd just research, but no longer have that luxury.

Thanks again for your time...

Posted by: Brian Chandler Jan 12 2009, 01:33 AM

QUOTE(Baffled in Baltimore @ Jan 12 2009, 01:27 AM) *

Hello again; and thanks for your patience.

I uploaded recent samples with the following results:

CODE

3 && $_GET['section']=='100'.count($section)-2) { echo $section[(count($section)-2)].'
Previous Next

'; } // items between the first and last: else if(isset($_GET['section']) && $_GET['section']>1001 && $_GET['section']<'100'.count($section)-2) { for($i=2; $i<(count($section)-2); $i++) { if($_GET['section']=='100'.$i) { echo $section[$i].'
Previous Next

'; } } } // first item of two or more: else if(count($section)>3) { echo $section[1].'
Previous Next

'; } // single item: else { echo $section[1].'
Previous Next

'; } ?>


This is a copy/paste of the screen output. I see what you mean by it being "Buggy" The first section was saved as .php and .html; with and without html elements (body, dtd. etc) with similar results. The Content sect was saved as content.html


Any thoughts on this, or is server php-deficient?

Thanks again...


We need to know exactly what you did. What is the name of the file you uploaded? What is its URL so we can see? What instructions does your host give for enabling php? Etc.

AFAICS, you want to port your Excel[sp?] spreadsheet to a database, and generate the pages with (e.g.) PHP (or possibly something else). This is a straightforward sort of job for a web programmer, but it is not a _simple_ task for someone who isn't. HTH.

Posted by: Christian J Jan 12 2009, 08:17 AM

QUOTE(Baffled in Baltimore @ Jan 11 2009, 10:43 PM) *

In the mean time, I need to move back over to the original idea of using jscript and divs; it would be a big improvement over what's being done now.

Can you provide sample script / html for the purpose at hand?

The article Frederiek linked to has a demo here: http://www.alistapart.com/d/eatcake/final.html

There are a few disadvantages with JS, though. If there's a lot of content the page will take some time to load. If OTOH the content is not that big, why not make all the sections visible on the same page and save yourself the hassle with the hide/show mechanism? Search engines may (at least in theory) consider hidden content as SE manipulation.

Posted by: Baffled in Baltimore Jan 12 2009, 09:10 AM

This url produced the previous results; it has a php ext.
http://www.wjstewart-associates.com/_body.php

This url with an html ext produces the following results
http://www.wjstewart-associates.com/_body.html

CODE

3 && $_GET['section']=='100'.count($section)-2) { echo $section[(count($section)-2)].'
Previous Next

'; } // items between the first and last: else if(isset($_GET['section']) && $_GET['section']>1001 && $_GET['section']<'100'.count($section)-2) { for($i=2; $i<(count($section)-2); $i++) { if($_GET['section']=='100'.$i) { echo $section[$i].'
Previous Next

'; } } } // first item of two or more: else if(count($section)>3) { echo $section[1].'
Previous Next

'; } // single item: else { echo $section[1].'
Previous Next

'; } ?>


And the external file it seeks
http://www.wjstewart-associates.com/content.html

It would seem the server is not php enabled and is unlikely it will be. I haven't heard from them yet but I feel it will not go well. Although it would be advantagious, server-side data manipulation may not be possible with this host. This is why alternative methods are being sought...

Thanks again for your time

Posted by: Christian J Jan 12 2009, 10:12 AM

QUOTE(Baffled in Baltimore @ Jan 12 2009, 03:10 PM) *

This url produced the previous results; it has a php ext.
http://www.wjstewart-associates.com/_body.php

This url with an html ext produces the following results
http://www.wjstewart-associates.com/_body.html

Indeed it seems PHP is not supported. (As a side-note, the BODY content in my examples should be pasted into an existing HTML document, but that's not the issue here). Is your host freewebs/webs? If so http://www.webs.com/pages/faqs/ says they don't support PHP.

Since you appear to sell lots of things perhaps a database-driven site would be the most practical, like Darin already suggested. A web host offering that shouldn't cost much more than the current one, but of course someone must set it all up as well. Probably some web hosts feature preinstalled database-driven shopping-cart systems.

Posted by: Brian Chandler Jan 12 2009, 11:02 AM

QUOTE
Indeed it seems PHP is not supported.



On what evidence? That something.php doesn't get parsed? This is no evidence at all. Only the hosting service can tell you whether or not you can run PHP.

Posted by: Baffled in Baltimore Jan 12 2009, 11:07 AM

In regards to

QUOTE
The article Frederiek linked to has a demo here

Thank you for that.

I know that jscript can be somewhat burdonsome with large amounts of content and poses compatability issues but my intention is going with maybe a 20-record page of content divied up using divs; less than 100k in size for any given page.

It's sort of a drill-down scheme;
Each NEW page is to be a category of its own having anywhere from a few items (divd content) to maybe 20 or so.
The catalog home page is to be a thumbnail page of an image out of each category.
The user selects an image, opening that category thumbnail page.
The user picks first image opening that images full jpg and descriptive text; prev next and back to category links are now present.

It is my preference anyway, to avoid too much scrolling by capturing the full jpg with its descriptive text and paypal link than to have the user scroll from one set of info to another. This can be confusing and hard to follow; This is also purpose of having a thumbnail page for each category; a visual aid of what is in any given gategoey. Too much info is just a click away to another website for the user. I am trying to avoid this.

The pages in use are all compiled in full html using sub-routines written in VB for Excel. I don't have to run the full html for the items, I can modify the way each item is compiled in Excel by using tables, divs, menu script, whatever I want by simply changing what gets concactenated. Then it's just a matter of copying the first concactenated item down to the last, all with the same attributes but with a different item and its associated content.

Then this code gets pasted as values, then copied from Excel and pasted into my html editor; file is saved then uploaded.

It sounds more complicated than it is but its not that bad; and it works well.

Why do I use Excel for this? It is said that "a Picture is worth a Thousand words"
I couldn't find a gallery program that does what I got Excel to do; and that is tag each image with their appropriate url that changes sub-directories with their numbering scheme and to avoid having to duplicate thousands of images on my site for the same purpose. These images are on another servier which I lease with download and copy-righrs.

Well, that's it in a nut-shell; my task-at-hand. Now with vision issues, having to eliminate many pages (single-item content) and replacing them with just a few has now become necessary'

By the way, my Excel db started with 4-col of data; item#, title, full description, and base price. The db grew a 5th col for "Truncated description and finally; a Category col. In selecting records to work with, I can sort by category then work with that.

Thank you again for your support and patience.

Posted by: Baffled in Baltimore Jan 12 2009, 11:26 AM

Hello again Christian, J

My thanks again to Darin for his valuable input

I mentioned in a previous post that my current host would be problamatic for this and that I also have an ftp with another host I use infrequently.

The hostname is startlogic and my account with them was started following some issues I had with the freewebs people.

The scripting you proposed sounds promissing and if the startlogic server supports php (and it does, just have to enable it) then this is my other option; move over to it. But this would involve re-writing for the ftp urls from my current http site.

Right now, this would be more trouble than current effort in maintaining what's already on the http; at least for now until my vision improves (if it does); Rock and a hard place...

Thanks again for your time.

Posted by: Baffled in Baltimore Jan 12 2009, 04:24 PM

Hello again everyone. This was just received:

QUOTE
Webs.com does not support PHP or other languages that require server side access.

Yup; just as suspected...

I can see black on white but not shades of grey on each-other; I'm finding more and more websites like this.

This url is just 1 of maybe a couple-dozen I plan to compose. It is the auto_travel category in progress and is the "Basic content" from all the other pages in this category that will be remoxed later on.
http://www.wjstewart-associates.com/auto_travel.html

When viewing the Source, you will see the attempt I made with the major divs; they all have a unique ID. All I am trying to do is have one major div show at a time because it will be targeted to an Iframe sized for the divd content. I believe Prev - Next links will be helpful for those who wish to use them. File size for this one is a little over 14k; not very large.

Thanks for your help.

Posted by: Frederiek Jan 12 2009, 04:39 PM

For what it's worth, Stu Nicholl's http://www.stunicholls.com/gallery/slideshow.html might be something for you. Or maybe others in his Galleries.

Posted by: Darin McGrew Jan 12 2009, 04:50 PM

QUOTE(Baffled in Baltimore @ Jan 12 2009, 02:24 PM) *
I can see black on white but not shades of grey on each-other; I'm finding more and more websites like this.
Browsers have a number of accessibility-related features. You should be able to enforce a high-contrast color scheme and/or larger font sizes if that's what you need.

Unfortunately, there are a lot of sites that fall apart when such accessibility-related features are used. But if you need these features, then their content wouldn't be accessible anyway.

QUOTE(Baffled in Baltimore @ Jan 12 2009, 02:24 PM) *
This url is just 1 of maybe a couple-dozen I plan to compose. It is the auto_travel category in progress and is the "Basic content" from all the other pages in this category that will be remoxed later on.
http://www.wjstewart-associates.com/auto_travel.html
FWIW, I see a list of products, which looks fine to me. That's what others will see when JavaScript is disabled/unavailable.

Posted by: Baffled in Baltimore Jan 12 2009, 05:02 PM

Hello Fredrick; and thanks.

This is similar to some of the script one would find on Dynamic Drive's website (one of my favorite things). What I have going now is a culmination of Gallery-like content with image links that change source folders when the item# changes so standard gallery script wouldn't work very well.

When incorporated, the pre-existing problem of targeting a server-based library still exists.

Thanks again for the help

Posted by: Baffled in Baltimore Jan 12 2009, 05:19 PM

Hello Darin and thanks

QUOTE
Browsers have a number of accessibility-related features.

I can scroll-up the text size, it is contrast that is hard to overcome...

I know jscript would be a problem for those browsers that don't support it and not everyone is going to install nor enable it for one site. It is realized w/o js, the content would show as written, and hence the problem; Since DOM seems to be widely supported, wouldn't it be a worth a try?

Thank you

Posted by: Darin McGrew Jan 12 2009, 06:53 PM

QUOTE
Browsers have a number of accessibility-related features.
QUOTE(Baffled in Baltimore @ Jan 12 2009, 03:19 PM) *
I can scroll-up the text size, it is contrast that is hard to overcome...
Your browser should have the option to ignore colors specified by the web page. There isn't much you can do about images (including images of text, which are far too popular), but that will guarantee adequate contrast for all the text content on the page.

If you find yourself increasing the font size on most pages, then it will save you time to enforce a minimum font size in your browser settings. If you're using MSIE, then all you can do is tell it to ignore the font sizes specified by the web page, but that should still help.

Posted by: Christian J Jan 12 2009, 08:18 PM

QUOTE(Baffled in Baltimore @ Jan 12 2009, 10:24 PM) *

This url is just 1 of maybe a couple-dozen I plan to compose. It is the auto_travel category in progress and is the "Basic content" from all the other pages in this category that will be remoxed later on.
http://www.wjstewart-associates.com/auto_travel.html

The images are a bit large. If they were much smaller thumbnails (linking to larger versions, say in popups) the page would become much smaller and easier to scroll down.

QUOTE
All I am trying to do is have one major div show at a time because it will be targeted to an Iframe sized for the divd content.

The iframe on the home page http://www.wjstewart-associates.com ? Frames and iframes often cause various trouble (like users opening a link in a new window outside the parent frame, or search engines linking directly to orphaned frame pages).

QUOTE
I believe Prev - Next links will be helpful for those who wish to use them.

Not sure about that, at least not as the only means of navigation. Especially on product pages customers may prefer some kind of thumbnail gallery like on http://www.wjstewart-associates.com/Catalog/Gallery/content/auto.html rather than have to view every item one at the time.

QUOTE
File size for this one is a little over 14k; not very large.

Don't forget the images, they add up to much more.


Posted by: Christian J Jan 12 2009, 08:23 PM

QUOTE(Baffled in Baltimore @ Jan 12 2009, 11:19 PM) *

I know jscript would be a problem for those browsers that don't support it and not everyone is going to install nor enable it for one site.

FWIW all major browsers in use today support javascript, even (at least some) mobile phone browsers. A few (1-2%?) advanced users may disable JS, but then they also know how to enable it again. Search engines don't support JS, though, and it's generally good practice to make web sites not rely on JS in order to work.

Posted by: Brian Chandler Jan 12 2009, 11:51 PM

QUOTE(Darin McGrew @ Jan 13 2009, 06:50 AM) *

QUOTE(Baffled in Baltimore @ Jan 12 2009, 02:24 PM) *
This url is just 1 of maybe a couple-dozen I plan to compose. It is the auto_travel category in progress and is the "Basic content" from all the other pages in this category that will be remoxed later on.
http://www.wjstewart-associates.com/auto_travel.html
FWIW, I see a list of products, which looks fine to me. That's what others will see when JavaScript is disabled/unavailable.


Like Darin, I see just a list of products, which looks OK. But a few points:

The BIG question is this: how are you generating this page? Did you basically create it all manually? Or do you have a script of some sort that generates it from your spreadsheet? It seems to me you are confusing two separate issues: how to present the information to the visitor, and how to generalise its production from a large number of products.

Here's a suggestion - why don't you look at bizium.com, which you can find discussed in the "Review" forum (Site Review Requests) below.

A minor point: your <div> for each product seems to be a fixed size in pixels. This is a Bad Idea, since pixels vary in effective size: users with sight difficulties, or just nonstandard monitor settings need to increase the character font size, so the content overflows.

Posted by: Baffled in Baltimore Jan 13 2009, 02:24 PM

Thank you for all the responses; some useful info indeed

However, I believe we're loosing focus of the issue at hand. Yes, my vision is an issue and primary reason I am on this quest, but it is not the focal point of this discussion.

I am here because I will have extreme difficulties maintaining my site as written; I am loosing my sight. I am not a web programmer, I am an industrial troubleshooter (was, before vision problem)

The topic is finding a way to minimize the maintenance effort by eliminating the hundreds of already produced product pages (and the necessity of creating more of them) It was thought that combining the content of many single pages into one categorized page would be the fix. This was accomplished and demonstrated here with one of maybe 2-dozen similar pages also to be created: http://www.wjstewart-associates.com/auto_travel.html

My server does not support php, so that's out. Anything-else has to be accomplished by other means. If jscript (not search friendly) or DOM are not viable solutions, please help with alternatives. I know they are out there.

As published, categorized thumbnails are already in use but they reference the many pages that now have to be maintained and in need of removal once a fix is found. An example of this is found here
http://www.wjstewart-associates.com/Catalog/Gallery/content/auto.html.
This is one of several thumbs pages that currently target the many external pages that will be removed.

QUOTE
The BIG question is this: how are you generating this page?

As previously mentioned, I use VB scripts in Excel to create the pages. The subroutines include many other variations ranging from a few divd content to full html that is pasted into my html editor, saved then uploaded. The script references a workbook containing the master records; these are manually created with a “New Record” subroutine also written in VB. In practice, it may take anywhere from a few seconds to maybe a minute or so to create a new record. The Master is frequently-saved and backed-up for use by the HTML creator workbook used for manipulation of the records that will be uploaded.

QUOTE
The iframe on the home page

To be honest, I don’t much-like using them either. This was done to prevent duplication of the parent. It is heavily CSS-based for style, layout, etc. It was desirable to maintain the structure and layout of the site by using an Iframe for deployment of content in the same area, avoiding page-changes and shifting of theme.

QUOTE
Not sure about that, at least not as the only means of navigation. Especially on product pages customers may prefer some kind of thumbnail gallery like on http://www.wjstewart-associates.com/Catalo...ntent/auto.html rather than have to view every item one at the time

I’m a shop by image type myself. This was never mentioned as the only means of navigation, merely an option along with other links to return the thumbs page for another selection or select another category.

The idea is when a category is selected; the thumbs page for that category is displayed in the content Iframe. Next, an Image is selected, loading the page replacing the thumbs page with the selected content. Along with this are the necessary navigation links for Prev-Next, etc.

QUOTE
Search engines don't support JS

This was a given; I would like to avoid jscript for this reason and is why I am here, to seek out viable options. If jscript is the only way out, then so-be-it; but let’s avoid it if possible.

QUOTE
Like Darin, I see just a list of products, which looks OK.

Yes, it does; but when using Iframes, the scrolling has an effect of loosing focus from the rest of the current page when it scrolls out. And the reason I am using a full image is to prevent text wrapping around it when the description gets a bit wordy.
Another point to consider is this; Not everyone uses a scroll mouse, some still have to click and drag those bars. This is why I am seeking a way of displaying one item at a time with link options. By the way, I believe the Iframe is suitably-sized for most resolutions commonly used for web-browsing. Another point is compatibility and Iframes. When the selected content is viewed in an incompatible browser, it will loose the frame attributes, retaining the content. But the content needs to meet compatibility criteria for this to work.

QUOTE
It seems to me you are confusing two separate issues: how to present the information to the visitor, and how to generalise its production from a large number of products

Actually, this is not entirely accurate. Production by generalization was never an issue. Production is by local means merely attempting a better way (from current build) of presentation based on popular tripe while reducing the profound effects site maintenance will have on me when my vision goes from bad to worse; this was already prognosticated.

This all started as a simple problem.(kind of big, but simple) in search of a viable solution. I just need a way of displaying 1-divd-content (paragraph) at a time of whatever category page is loaded.

Goal is to eliminate the many by replacing them with a few. The few is much easier and manageable to maintain.

Thank you all once again.

Posted by: Darin McGrew Jan 13 2009, 02:51 PM

QUOTE
This all started as a simple problem.(kind of big, but simple) in search of a viable solution. I just need a way of displaying 1-divd-content (paragraph) at a time of whatever category page is loaded.
To me, this looks like a specific proposed solution, not a statement of the problem. The problem is that it is difficult to maintain your site using your current methods.

Some of us are trying to help you with the underlying problem, not necessarily with your proposed solution.

Posted by: Baffled in Baltimore Jan 13 2009, 03:14 PM

Thank you

QUOTE
To me, this looks like a specific proposed solution

No, this was not the intent. The problem is not being able to come up with a way of displaying specifically-targeted content from a given page. Any help in this area is greatly appreciated.

Thank you again for your time

Posted by: Christian J Jan 13 2009, 07:10 PM

QUOTE(Baffled in Baltimore @ Jan 13 2009, 08:24 PM) *

My server does not support php, so that's out.

Assuming PHP turned out the best solution I suspect changing web host would be worth it. Learning PHP is of course another issue.

QUOTE
QUOTE
The iframe on the home page

To be honest, I don’t much-like using them either. This was done to prevent duplication of the parent.

Again you could use e.g. PHP (or Excel?) to include common content from an external file.

QUOTE
It is heavily CSS-based for style, layout, etc. It was desirable to maintain the structure and layout of the site by using an Iframe for deployment of content in the same area, avoiding page-changes and shifting of theme.

With an external CSS file this should not be a problem.

QUOTE
The idea is when a category is selected; the thumbs page for that category is displayed in the content Iframe. Next, an Image is selected, loading the page replacing the thumbs page with the selected content. Along with this are the necessary navigation links for Prev-Next, etc.

As long as there's a "Back to category"-link there. smile.gif

QUOTE
QUOTE
Search engines don't support JS

This was a given; I would like to avoid jscript for this reason and is why I am here, to seek out viable options. If jscript is the only way out, then so-be-it; but let’s avoid it if possible.

Search engines will have no problem indexing a page like http://www.alistapart.com/d/eatcake/final.html since the JS/DOM is just an enhancement of the existing content (as opposed to creating the content with JS). The problem here is more that hidden content is considered search engine manipulation and may get punished, http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=66353 but I have no idea if or how much it matters in practice. To my surprise I couldn't find much discussions about the "Eat cake" design and search engines.

QUOTE
the reason I am using a full image is to prevent text wrapping around it when the description gets a bit wordy.

That could be prevented with a two-column layout. E.g., you could put the text in P elements and give these a left margin wide enough to stay free of the floated images.

QUOTE
Another point to consider is this; Not everyone uses a scroll mouse, some still have to click and drag those bars. This is why I am seeking a way of displaying one item at a time with link options.

How about simply using http://htmlhelp.com/faq/html/links.html#named-anchor? Especially as long as you're using the iframe this seems to be all you really need. Creating the anchor links for lots of page sections might be tedious, though.

In any case, hiding and showing parts of a page with JS and then showing the visible part through an iframe seems unnecessarily complicated.

QUOTE
By the way, I believe the Iframe is suitably-sized for most resolutions commonly used for web-browsing.

I think it's a bit small, while the index page http://www.wjstewart-associates.com/ contains a lot of unused space...

Posted by: Baffled in Baltimore Jan 13 2009, 08:37 PM

Greetings Christian, J
And thank you for your great advice. No, PHP will not be considered for a while.

QUOTE
How about simply using internal links on the page?

Actually, this was initially attempted and I still may go with this one. The thought was to maintain navigation for convenience. They may go in a seperate section; say a mouseover menu. But this idea will only work on a link. A context menu was also considered but quickly dropped.

QUOTE
Creating the anchor links for lots of page sections might be tedious, though.

Not really; Excel is very good at handling repetition. This can be pre-installed as part of the creation process when the code is concactenated

QUOTE
In any case, hiding and showing parts of a page with JS and then showing the visible part through an iframe seems unnecessarily complicated.

On this issue, I tend to agree. Sometimes in trying to simplify something, too much gets put in the mix; over-complicating it. But sometime one has to make the WORKS complicated to make it simpler to run.

QUOTE
I think it's a bit small, while the index page http://www.wjstewart-associates.com/ contains a lot of unused space...

I never was too good at dealing with the realestate angle but I'm not much of a web designer; I am working on it though.

Thanks again for the great advice

Posted by: Christian J Jan 14 2009, 07:34 AM

QUOTE(Baffled in Baltimore @ Jan 14 2009, 02:37 AM) *

QUOTE

How about simply using internal links on the page?

Actually, this was initially attempted and I still may go with this one. The thought was to maintain navigation for convenience. They may go in a seperate section; say a mouseover menu. But this idea will only work on a link. A context menu was also considered but quickly dropped.

What I had in mind was something simple like this. You could put both the thumbnail gallery and the associated sections all on the same page:

CODE
<div id="gallery">Thumbnail gallery</div>

<div id="s0">
<a href="#gallery">Thumbnail gallery</a> | <a href="#s1">Next</a>
<img src="item.jpg" width="150" height="100" alt="">
<p>Section content</p>
</div>

<div id="s1">
<a href="#s0">Previous</a> | <a href="#gallery">Thumbnail gallery</a> | <a href="#s2">Next</a>
<img src="item.jpg" width="150" height="100" alt="">
<p>Section content</p>
</div>

<div id="s2">
<a href="#s1">Previous</a> | <a href="#gallery">Thumbnail gallery</a>
<img src="item.jpg" width="150" height="100" alt="">
<p>Section content</p>
</div>


That way the user would be able to make discrete "jumps" from one item to the next.

Posted by: Baffled in Baltimore Jan 14 2009, 08:53 AM

Hello again Christian, J

QUOTE
You could put both the thumbnail gallery and the associated sections all on the same page:


I was thinking the same thing; also heading each section with the links or using a mouseover menu. If I use a mouseover menu, I could give each called image a null link (#) to make the mouseover active but how would I get this to work for prev-next? Don't get me wrong, what you have in your sample code looks fine; just trying to minimize the effort and make it look nice.

The mouseover effect might seem too much, but it would eliminate the need for seperate sets of links for each section(DIV)

What is significance of the pound sign (#) in the links? Dumb question; I know but am having a senior-moment now.
I know that all by itself it acts as a do-nothing go no-where link.

Thanks again

Posted by: Baffled in Baltimore Jan 14 2009, 09:16 AM

For clarification;

By mouseover menu, I am referring to one that shows only when mouse is hovered over an image. The menu would have your Prev-Next-Gallery-Category, etc

Posted by: Christian J Jan 14 2009, 09:29 AM

QUOTE(Baffled in Baltimore @ Jan 14 2009, 02:53 PM) *

also heading each section with the links or using a mouseover menu. If I use a mouseover menu, I could give each called image a null link (#) to make the mouseover active but how would I get this to work for prev-next?

Didn't quite follow that. Why have more links at the top of the page if you already have the thumbnail gallery there? And how would the user navigate when he's arrived at an individual product (besides using the Back button?

QUOTE
The mouseover effect might seem too much, but it would eliminate the need for seperate sets of links for each section(DIV)

You could always generate the links and IDs with JS.

QUOTE
What is significance of the pound sign (#) in the links?

It's used to identify a location on the same page (an element defined by ID or NAME). See http://htmlhelp.com/faq/html/links.html#named-anchor or the first example at http://en.wikipedia.org/wiki/Fragment_identifier

QUOTE
I know that all by itself it acts as a do-nothing go no-where link.

Often it's used like that in links meant to be used only with javascript :

CODE
<a href="#" onclick="foo();">JS-dependent link</a>

but that makes browsers without JS show a non-functional link. If the link is only to be used with JS it's better to generate the link with JS as well.

Posted by: Baffled in Baltimore Jan 14 2009, 11:30 AM

Hello again Christian, J; and thanks

QUOTE
Didn't quite follow that. Why have more links at the top of the page if you already have the thumbnail gallery there? And how would the user navigate when he's arrived at an individual product (besides using the Back button?


It's not having more links at the top of the page, it's having a set of links available for each called item. (Once the link-to is called for first-item from the gallery)
This is based on what you proposed earlier, having the thumbs gallery and the divd content on the same page.

Sorry about the misnomer (#) = anchor, not null

I only know how to target when the target name is known, I don't have a clue on how to target anything wild-card or variable (for a Prev-Next scenario.)

What I envisioned is this: when an image is selected from the gallery, it displays the image and text-content for that image. Along with this, there would be navigation links (maybe at the beginning of each section) for the user to get the Next or Prev item or jump-to the gallery. ALTERNATELY, the beginning of each section would have a named anchor for the purpose of activating an onhover menu for the prev-next, etc links.

For any item selected, navigation is present. But the only way I know how to do this is when the item is known targeting each item on the page for Prev-Next. I am sure there are better methods; if targeting can be done with say; a variable, I would like to use it but I don't know how. Otherwise, its navigation for each section and/or using a popup menu system that activates (shows) onhover. It's overkill, but this method would probably be best.

PS: I'm thinking about those who don't use a scroll mouse; it would be more convenient for them to have this option

Posted by: Christian J Jan 14 2009, 03:57 PM

QUOTE(Baffled in Baltimore @ Jan 14 2009, 05:30 PM) *

I only know how to target when the target name is known, I don't have a clue on how to target anything wild-card or variable (for a Prev-Next scenario.)

The target element needs an ID (or NAME). This can be added with javascript, maybe like this (I added the first one for the gallery manually anyway):

CODE
<div id="gallery">
Put thumbnail gallery in this DIV
</div>

<div class="section">
<img src="..." width="..." height="..." alt="....">
<p>First item</p>
</div>

<div class="section">
<img src="..." width="..." height="..." alt="....">
<p>Middle item(s)</p>
</div>

<div class="section">
<img src="..." width="..." height="..." alt="....">
<p>Middle item(s)</p>
</div>

<div class="section">
<img src="..." width="..." height="..." alt="....">
<p>Last item</p>
</div>



<script type="text/javascript">
var div=document.getElementsByTagName('div');
var section=new Array();

for(var i=0; i<div.length; i++)
{
    if(div[i].className=='section')
    {
        section.push(i);
    }
}

function make_link(num, url, txt)
{
    var a=document.createElement('a');    
    a.href=url;
    a.appendChild(document.createTextNode(txt));
    div[section[num]].insertBefore(a, div[section[num]].firstChild);    
    var space=document.createTextNode(' ');
    div[section[num]].insertBefore(space, div[section[num]].firstChild);
}

for(var i=0; i<section.length; i++)
{
    div[section[i]].id='s'+i;
    if(i!=section.length-1)
    {
        make_link(i, '#s'+1*(i+1), 'Next');
    }
    make_link(i, '#gallery', 'Gallery');
    if(i!=0)
    {
        make_link(i, '#s'+1*(i-1), 'Previous');
    }
}
</script>

The thumbnail gallery must be in a DIV with the ID "gallery", while products must be added in DIVs with the CLASS "section".

The script must be placed after the product DIVs on the page (if you rather want it in the page's <HEAD> it must first be modified slightly, and the script may appear to run slightly slower in some browsers).

If you load an external JS file in the <script> element the same script can be used for multiple pages.

Posted by: Baffled in Baltimore Jan 14 2009, 05:23 PM

Hello again Christian, J
This script looks a bit unique; If the script can be run as an external .js, (this is probably preferred) what method would work best to call it? a <script>src=,,,</script> inside the <HEAD> tags of the product pages containing the gallery divs?

The divd sections you mentioned wouldn't have to be serialized (section01, section02, etc) would they?

Thanks again

Posted by: Christian J Jan 14 2009, 06:59 PM

QUOTE(Baffled in Baltimore @ Jan 14 2009, 11:23 PM) *

If the script can be run as an external .js, (this is probably preferred) what method would work best to call it? a <script>src=,,,</script> inside the <HEAD> tags of the product pages containing the gallery divs?

For an external file, use

CODE
<script type="text/javascript" src="external.js"></script>

You don't have to put it in the <head> section, but if you want to you must add this around the original script:

CODE
window.onload=function()
{

     // original script goes in here

}


QUOTE
The divd sections you mentioned wouldn't have to be serialized (section01, section02, etc) would they?

No the script does that automatically. The DIVs do need the CLASS "section", though (actually you could get rid of the classes too, but then you couldn't use DIVs for anything but product sections).


Posted by: Baffled in Baltimore Jan 14 2009, 09:06 PM

Hello Christian, J
OK; thanks. I'll hard-code Excel accordingly

It's been a real challenge these past few weeks with my vision fading in & out; now my mouse is acting up. If I weren't slightly superstitious, I'd ask "WHAT's NEXT!" but I dare not...

I'll get something together and post it later for critique

Thanks again for your time and assistance

Posted by: Baffled in Baltimore Jan 16 2009, 05:22 PM

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

Posted by: Darin McGrew Jan 16 2009, 06:20 PM

I would use a server-side content management system, so the links can use real URLs that can be bookmarked, linked to by other sites, indexed by search engines, etc.

Posted by: Baffled in Baltimore Jan 16 2009, 06:27 PM

Hello Darin; and thanks

Unfortunately, my server does not support PHP or other languages that require server side access.



Posted by: Baffled in Baltimore Jan 16 2009, 06:40 PM

QUOTE(Baffled in Baltimore @ Jan 16 2009, 06:27 PM) *

Hello Darin; and thanks

Unfortunately, my server does not support PHP or other languages that require server side access.


PS:
The sample code is strictly generic; actual url's would be used of course

Posted by: Christian J Jan 17 2009, 07:09 AM

QUOTE(Baffled in Baltimore @ Jan 16 2009, 11:22 PM) *

I was thinking of replacing the iframe scheme on my site by using divs for targeting multiple html.

Using DIVs how? unsure.gif

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.

Posted by: Baffled in Baltimore Jan 17 2009, 01:15 PM

huh.gif I may know-enough about web-design to squeak by, but not enough to make it right...

QUOTE

Using DIVs how? unsure.gif
More accurately, what I am looking for is a way of calling one, two or three external pages depending what is selected from the site navigation or navigation in the sidebar and targeting these pages (or some of their content) into named divs. One page that is ALWAYS targeted is the "content" div (now an iframe named 'content')

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.

Posted by: Darin McGrew Jan 17 2009, 07:19 PM

QUOTE
But what scheme supports them ALL?
Server-side mechanisms don't rely on browser capabilities. But you have indicated that you don't have access to server-side mechanisms.

Posted by: Baffled in Baltimore Jan 17 2009, 09:33 PM

QUOTE
Server-side mechanisms don't rely on browser capabilities. But you have indicated that you don't have access to server-side mechanisms.

Thank you
The question was rhetorical
I do not have server-side access with my server.

Posted by: Frederiek Jan 18 2009, 05:18 AM

Go see http://www.ndoherty.com/demos/coda-slider/1.1.1/.
It uses a coda-slider javascript, in conjunction with JQuery.
All content is within the page itself.

Posted by: Christian J Jan 18 2009, 07:23 AM

QUOTE(Baffled in Baltimore @ Jan 17 2009, 07:15 PM) *

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.

Posted by: Baffled in Baltimore Jan 18 2009, 11:19 AM

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 - Always
Header - 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.)

Posted by: Baffled in Baltimore Jan 18 2009, 11:27 AM

QUOTE
All content is within the page itself.
Nice!
Not exactly what I had in mind but Nice!

Thanks:)

Posted by: Christian J Jan 18 2009, 01:01 PM

QUOTE(Baffled in Baltimore @ Jan 18 2009, 05:19 PM) *

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?)

XHTML 1.0/Transitional allows iframes, XHTML 1.0/Strict doesn't (neither does HTML 4.01/Strict). But I don't recommend using XHTML in the first place, since it brings no benefits and just complicates things for the author. Use valid HTML 4.01 instead (Strict if possible).

In the future perhaps HTML5 will be used rather than XHTML: http://www.w3.org/TR/html5/

Posted by: Christian J Jan 18 2009, 01:04 PM

QUOTE(Baffled in Baltimore @ Jan 18 2009, 05:27 PM) *

QUOTE
All content is within the page itself.
Nice!
Not exactly what I had in mind but Nice!

Note that such a page would take a lot of time to download, especially if it contains lots of large images.

Posted by: Baffled in Baltimore Jan 18 2009, 01:22 PM

OK; thanks.
I'll stick with what I have for now but with the possibility of moving ahead with html 4.01 strict in the future.

Thanks again.

Posted by: Baffled in Baltimore Jan 18 2009, 01:24 PM

QUOTE
Note that such a page would take a lot of time to download, especially if it contains lots of large images.
It's what I had in mind as well.

Posted by: Frederiek Jan 18 2009, 01:28 PM

oh well, it was just a suggestion which seemed like you wanted it, with next/previous possibilities.

Anyway, I regularly surf to http://www.smashingmagazine.com/ for lots of usefull resources, from which I found the Coda-Slider script.

Posted by: Baffled in Baltimore Jan 18 2009, 04:15 PM

QUOTE(Frederiek @ Jan 18 2009, 01:28 PM) *

oh well, it was just a suggestion which seemed like you wanted it, with next/previous possibilities.

Anyway, I regularly surf to http://www.smashingmagazine.com/ for lots of usefull resources, from which I found the Coda-Slider script.

Like I said b4, it,s a nice script and maybe useful at some point, but I need to avoid scripts or anything that would complicate maintenance and cause bandwidth issues.

Simplify, simplify, and simplify.

I kind of like Dynamic Drive for certain things. It is where I got the menu-slider script I use for the catalog pages of my site. When the user hovers mouse to it, it opens with links to other pages. Although the script is part of each page that uses it, (and acceses an external jscript). it is small-enough and the file does not corrupt when I use html-tidy in my editor; many html files with script often does.

Thanks again for your contribution; it is appreciated.

Posted by: Christian J Jan 19 2009, 08:38 AM

QUOTE(Baffled in Baltimore @ Jan 18 2009, 05:19 PM) *

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 - Always
Header - Mostly
Sidebar - 2 or 3 for Catalog Navigation (in build).

Would it be possible to put all Header content (including variations) and all Sidebar menus on the index/home page (so that they are always visible there)? If so I have an idea, but must test it a little more first.

Posted by: Baffled in Baltimore Jan 19 2009, 09:52 AM

QUOTE
Would it be possible to put all Header content (including variations) and all Sidebar menus on the index/home page (so that they are always visible there)? If so I have an idea, but must test it a little more first.

Actually, I believe this would be preferred.

Thank you

PS
If it will help, the style sheet can be found http://www.wjstewart-associates.com/content/style.css

Posted by: Christian J Jan 19 2009, 02:34 PM

Here's a simple demo: http://hem.fyristorg.com/g-force/test/javascript_SSI/foo.html

I've used both a hidden IFRAME and JS for this. The IFRAME is hidden from human users, but JS should still be able to read the contents of the index page through it (if both pages are on the same domain). If it doesn't work for some reason, browsers should at least be able to use the link to the Home page.

I've tested in latest MSIE, Firefox, Safari and Opera (all in Windows) but try more browsers/versions before using this. There could be some serious bugs, for example I had to fix one that caused an infinite loop in MSIE7 (so I had to close the browser from Windows Task Manager).

All included DIVs will end up at the end of the page by default, but this can be changed to the beginning. You can also position them with CSS.

Installation

1. On the index/home page, add everything that you want included on other pages in separate DIV elements, and give each DIV its own ID. In the future you'll only edit menus on this page.

2. On each page where you want to include things, add the following HTML:

CODE
<iframe onload="include('header','menu1','menu2');"
src="/" width="1" height="1" name="iframe"
style="position: absolute; left: -100px;"></iframe>
<a href="/">Home</a>
<script type="text/javascript" src="include.js"></script>

Both the IFRAME and the "Home" link should point to the index/home page (i.e., "/").

Put the IDs of the DIV elements you want included from the index page in here:

CODE
onload="include('header','menu1','menu2');"

(the example above loads DIVs with the IDs 'header', 'menu1' and 'menu2'). You can add as few or as many as you want, as long as they exist on the index/home page. If one doesn't exist, none will show up.

3. Put the following in the external JS file "include.js":

CODE
var finished;
function include()
{
    if(finished!='yes')
    {
        // first making an array prevents a bug in MSIE:
        var codeblock=new Array();
        for(var i=0; i<include.arguments.length; i++)
        {
            var div_content=top.iframe.document.getElementById(include.arguments[i]).innerHTML;
            codeblock.push('<div id="'+include.arguments[i]+'">'+div_content+'</div>');
        }

        for(var i=0; i<codeblock.length; i++)
        {
            document.body.innerHTML+=codeblock[i];
        }
    }
    finished='yes'; // prevents an infinite loop bug in MSIE
}


Posted by: Brian Chandler Jan 19 2009, 02:48 PM

QUOTE(Christian J @ Jan 20 2009, 04:34 AM) *

Here's a simple demo: http://hem.fyristorg.com/g-force/test/javascript_SSI/foo.html



Hmm, doesn't appear to "work" for me (though I've no idea what "work" means)...

QUOTE


CODE
<iframe onload="include('header','menu1','menu2');"

...

function include()
{
...



Well, you have declared include() with no arguments, but have called it with three. Shurely shomething wrong here?

Posted by: Christian J Jan 19 2009, 06:20 PM

QUOTE(Brian Chandler @ Jan 19 2009, 08:48 PM) *

Hmm, doesn't appear to "work" for me (though I've no idea what "work" means)...

Which browser/version? "Work" means content from the "index.html" file is included in "foo.html".

QUOTE

you have declared include() with no arguments, but have called it with three. Shurely shomething wrong here?

No, they are used in the arguments array, as explained here: http://www.javascriptkit.com/javatutors/rfunction3.shtml

Posted by: Baffled in Baltimore Jan 19 2009, 06:23 PM

Thanks guys:

I'll try to do something with all this good info when I can.
For now, my eyes are bothering me too much from strain so I have to break from this a bit and my server is acting retarded again. Been trying to upload some files for demo use but it keeps stalling.

QUOTE
Brian
Hmm, doesn't appear to "work" for me (though I've no idea what "work" means)...

Isn't work a 4-letter word???

Upload completed: Finally. Now I can rest a bit.

http://www.wjstewart-associates.com/demo/_gallery_index.html
Just an Idea I was toying with; I added a dom image rollover effect to the gallery pages. The idea is for the image to rollover to a bigger image when hovered. After trying it out, it seems somewhat obtrusive when an image is clicked from the thumbs gallery;

I don't know; suggestions?

Thanks again for all the good input fellas; it is appreciated

Posted by: Christian J Jan 19 2009, 07:20 PM

QUOTE(Baffled in Baltimore @ Jan 20 2009, 12:23 AM) *

Just an Idea I was toying with; I added a dom image rollover effect to the gallery pages. The idea is for the image to rollover to a bigger image when hovered. After trying it out, it seems somewhat obtrusive when an image is clicked from the thumbs gallery;

Like here: http://www.wjstewart-associates.com/demo/auto_travel.html#37296 ? Must agree about the obtrusiveness, especially since it makes all the text reflow. blink.gif

Posted by: Baffled in Baltimore Jan 20 2009, 08:02 AM

QUOTE(Christian J @ Jan 19 2009, 07:20 PM) *

QUOTE(Baffled in Baltimore @ Jan 20 2009, 12:23 AM) *


Like here: http://www.wjstewart-associates.com/demo/auto_travel.html#37296 ? Must agree about the obtrusiveness, especially since it makes all the text reflow. blink.gif


Thanks;
It was Just a thought... Maybe a lame one, but a thought.
Loose the Rollover and go with a "Click for bigger view" (loads jpg in new window)?

Posted by: Baffled in Baltimore Jan 20 2009, 12:43 PM

QUOTE(Christian J @ Jan 19 2009, 02:34 PM) *

Here's a simple demo: http://hem.fyristorg.com/g-force/test/javascript_SSI/foo.html

I've used both a hidden IFRAME and JS for this. The IFRAME is hidden from human users, but JS should still be able to read the contents of the index page through it (if both pages are on the same domain). If it doesn't work for some reason, browsers should at least be able to use the link to the Home page.

I've tested in latest MSIE, Firefox, Safari and Opera (all in Windows) but try more browsers/versions before using this. There could be some serious bugs, for example I had to fix one that caused an infinite loop in MSIE7 (so I had to close the browser from Windows Task Manager).

All included DIVs will end up at the end of the page by default, but this can be changed to the beginning. You can also position them with CSS.

Installation

1. On the index/home page, add everything that you want included on other pages in separate DIV elements, and give each DIV its own ID. In the future you'll only edit menus on this page.

2. On each page where you want to include things, add the following HTML:

CODE
<iframe onload="include('header','menu1','menu2');"
src="/" width="1" height="1" name="iframe"
style="position: absolute; left: -100px;"></iframe>
<a href="/">Home</a>
<script type="text/javascript" src="include.js"></script>

Both the IFRAME and the "Home" link should point to the index/home page (i.e., "/").

Put the IDs of the DIV elements you want included from the index page in here:

CODE
onload="include('header','menu1','menu2');"

(the example above loads DIVs with the IDs 'header', 'menu1' and 'menu2'). You can add as few or as many as you want, as long as they exist on the index/home page. If one doesn't exist, none will show up.

3. Put the following in the external JS file "include.js":

CODE
var finished;
function include()
{
    if(finished!='yes')
    {
        // first making an array prevents a bug in MSIE:
        var codeblock=new Array();
        for(var i=0; i<include.arguments.length; i++)
        {
            var div_content=top.iframe.document.getElementById(include.arguments[i]).innerHTML;
            codeblock.push('<div id="'+include.arguments[i]+'">'+div_content+'</div>');
        }

        for(var i=0; i<codeblock.length; i++)
        {
            document.body.innerHTML+=codeblock[i];
        }
    }
    finished='yes'; // prevents an infinite loop bug in MSIE
}



I think we have the right orchard, but the wrong tree; what is proposed here is creating new pages with the variations.
What is needed is; go from http://www.wjstewart-associates.com/index.html page to http://www.wjstewart-associates.com/demo/_gallery_index.html page (Note the menu in sidebar and Heading; thay are different. The content changes with new menu in sidebar) without creating new pages. Can this be accomplished using this or any other script?

Or did I miss-read the intent of the above script?

PS
MENU AND CONTENT PAGES ARE THEIR OWN HTML PAGES AS WELL; BUT CURRENTLY NOT USED:
(This was done to allow external file targeting from other pages)

Posted by: Christian J Jan 20 2009, 04:19 PM

QUOTE(Baffled in Baltimore @ Jan 20 2009, 06:43 PM) *

Or did I miss-read the intent of the above script?

Maybe it's me that misunderstood? unsure.gif

The idea is that you change the include function's parameters (as shown below) depending on what content (headers, menus etc) you want to include on a page. E.g., one page might include "header1" and "menu2":

CODE
onload="include('header1','menu2');"

while another instead uses "header2" and "menu1":

CODE
onload="include('header2','menu1');"

...etc (as long as the included DIVs exist "hard-coded" on the index page).



Posted by: Baffled in Baltimore Jan 22 2009, 09:56 AM

QUOTE(Christian J @ Jan 20 2009, 04:19 PM) *

QUOTE(Baffled in Baltimore @ Jan 20 2009, 06:43 PM) *

Or did I miss-read the intent of the above script?

Maybe it's me that misunderstood? unsure.gif

The idea is that you change the include function's parameters (as shown below) depending on what content (headers, menus etc) you want to include on a page. E.g., one page might include "header1" and "menu2":

CODE
onload="include('header1','menu2');"

while another instead uses "header2" and "menu1":

CODE
onload="include('header2','menu1');"

...etc (as long as the included DIVs exist "hard-coded" on the index page).


This is a great idea but showing issues:Iframes are great for many things and reasons but poses a problem for html strict; hence the need to discontinue their use. How can a div be sugar-coated to function like an iframe for targeting external content?

Posted by: Christian J Jan 22 2009, 03:03 PM

QUOTE(Baffled in Baltimore @ Jan 22 2009, 03:56 PM) *

[*]Style sheets in use employ positioning as one of their functions; this would make it difficult to modify for adaptation of proposed theme. (Each new Div id will require its own declaration in the CSS)

You can also "hard-code" empty DIVs anywhere you want in the product pages where the header and menu content should be inserted. But then you must decide from the beginning on which (and how many) such containers you want to use (and rewrite the script accordingly).

QUOTE
[*]Menus and search engines in sidebar currently target the "content" iframe and works well using this element. The proposed theme does seem to work with directly-loaded content into their named divs but fails to work with anything targeted from another area of the page; a menu2 link for example, will not target the content div although the div is named /ID'd as content.

Didn't understand that. mellow.gif

QUOTE
[*]Menus and other content using external js fail to function properly when loaded into a sheet using this scheme. Don't know why, they just don't see the external js they rely on.

Could you make a test page showing this? One problem I can think of might be that your existing menu scripts are made to work with iframes.

QUOTE
Iframes are great for many things and reasons but poses a problem for html strict;

On the contrary: writing Strict HTML is not an end by itself (writing valid HTML is good, though). The reason for avoiding iframes is the problems they cause, as mentioned earlier.

QUOTE
How can a div be sugar-coated to function like an iframe for targeting external content?

With HTML alone it can't.

Posted by: Darin McGrew Jan 22 2009, 03:32 PM

QUOTE(Baffled in Baltimore @ Jan 22 2009, 03:56 PM) *
How can a div be sugar-coated to function like an iframe for targeting external content?
QUOTE(Christian J @ Jan 22 2009, 01:03 PM) *
With HTML alone it can't.
And frankly, using JavaScript to make div elements act like iframe elements isn't really any better than just using iframe elements to begin with. In addition to the normal problems associated with frames (inline or regular), you add the dependency on JavaScript.

Posted by: Christian J Jan 22 2009, 06:05 PM

QUOTE(Darin McGrew @ Jan 22 2009, 09:32 PM) *

And frankly, using JavaScript to make div elements act like iframe elements isn't really any better than just using iframe elements to begin with.

With IFRAMES all pages would be IFRAME-dependent, but in my system the index page doesn't need any IFRAMEs. Also you avoid the fixed-width of IFRAME containers, as well as their scrollbars.

QUOTE
In addition to the normal problems associated with frames (inline or regular), you add the dependency on JavaScript.

Not dependency, since there's a normal link back to the index page.

That said I should again emphasize that the better solution is a server-side one, even if it means changing web host.



Posted by: Baffled in Baltimore Jan 23 2009, 04:02 PM

Gentlemen; hello again.
I apologize for the brief hiatus.

I wish to thank you all again for your advice, comments and support. Due to health issues, I must put this on a back-burner for now and digress. In the mean time, remaining the status-quo is probably more apropos. Apologies also conveyed for taking everyone's time.

Upon my return, focus will probably be directed to making the move to the FTP host I currently have an account with. This may solve more problems than not...

Thank you all again

Posted by: Baffled in Baltimore Feb 4 2009, 11:48 AM

QUOTE
focus will probably be directed to making the move to the FTP host
Hello everyone;
Other health issues aside, my vision continues its degradation so I must press on with asking your help.

My FTP host is now in use and will be transferring domain soon. This host supports many server-side scripts and other functions, including MYSQL. I am a bit green when it comes to this so please bear with me while I ask your indulgence and to puruse the following:
http://wjstewart.startlogic.com/
The page this link opens is a brief narrative of what I am asking help with. Included also is a zip file you can download. This archive contains the files in use on the active website but with everything in their respective folders.
Please consider the archive as a boiler-plate of "what's there now" and as a starting point.

Thank you for your time.

Posted by: Baffled in Baltimore Feb 13 2009, 08:27 AM

QUOTE
However, I think it's better to use a database-backed system to generate different content at different URLs, rather than to have a single URL with multiple views depending on what JavaScript is doing.

Greetings Darin:
I finally moved my Domain to the startlogic server; (About time!) but there was little time for the tedious task of transferring everything over from that freewebs thing. There are many missing files I have yet to re-create and I am hoping there is a better way of page generation than the sloppy methods previously used. (I didn't know any better).

I now have server-side functionality including MYSQL, PHP and many other server-side scripts but I don't know how to use them well-enough to make any of it work. My vision continues to degrade so it is very difficult (and painful) to do much reading.

Could you Please elaborate on how I can use this, or some other method to generate Dynamic content or pages.

If data-base driven is the way to go, setting-up a few data fields might be a place to start. I don't know; you decide. How do I tackle this mess?

Thank you for your time.

Posted by: Darin McGrew Feb 13 2009, 01:25 PM

Sorry, but I don't have experience developing an ecommerce system. I've worked on such projects, but as a release engineer, not as a developer.

Perhaps one of these http://php.resourceindex.com/Complete_Scripts/Shopping_Carts/ will meet your needs.

Posted by: Baffled in Baltimore Feb 13 2009, 01:55 PM

QUOTE
Perhaps one of these http://php.resourceindex.com/Complete_Scripts/Shopping_Carts/ will meet your needs.

Thanks Darin
Actually, I did try shopcms_1_1_0 but find myself confronted with the same problem; I can't see well-enough to focus on what I am trying to do.

Thanks again

Posted by: Darin McGrew Feb 13 2009, 02:25 PM

Based on what you've written, to me it sounds like you need to get a computing environment that is better adapted to your needs, before you can proceed with this project on your own.

Posted by: Baffled in Baltimore Feb 13 2009, 07:27 PM

QUOTE(Darin McGrew @ Feb 13 2009, 02:25 PM) *

Based on what you've written, to me it sounds like you need to get a computing environment that is better adapted to your needs, before you can proceed with this project on your own.

Hello again Darin;
I had to re-installed everything on a new drive as my old drive became unstable. Suffice it to say, I had my share of challenges of late. I think that most of what's gone wrong is due to my inability to see well. I am here again because I have too much trouble reading most of what is found on the WEB; issue of primary concern is Contrast (I can only do so much thru a browser.) I can read high-contrast text to background but not when a low-contrast enviroment is encountered like in many of the sites I visited. This forum is adequate as it meets certain needs for this.

Since I now have server-side use but an un-configured data-base for now, what can you advise in using say, PHP or SSI for targeting to a webpage containing named div wrappers? A good sample or 2 will work wonders for me.

I know my data-base would be a good source but not sure how to structure it so I'm leaning towards PHP and maybe one or two external files for the source content.

Thank you again for the help

Posted by: Darin McGrew Feb 13 2009, 07:43 PM

You can enforce high contrast by configuring your browser to ignore document colors, so it will use only your own colors.

I don't have experience with PHP, and I don't have experience developing ecommerce systems. I've worked on ecommerce systems as a release engineer, but not as a developer.

Posted by: Baffled in Baltimore Feb 14 2009, 08:49 AM

QUOTE
You can enforce high contrast by configuring your browser to ignore document colors, so it will use only your own colors.
Ok, Thanks

Posted by: Baffled in Baltimore Feb 25 2009, 11:16 AM

Hello Christian, J
Thank you again for all your great help, I learned a great deal from you.

Regarding PHP
Since I now have server-side scripting capability, (YEAHHHH!!!) I was wondering if you could help with this;

http://www.wjstewart-associates.com/shop/gallery/content/auto1.php

The php currently loads into an iframe from one of my pages and it in turn loads in an external file called "test.html". How do I add a thumbs section to the php script if the external html that contains it has a DIV ID'd as "gallery"?

The PHP you provided

CODE
<?php

// content of the remote HTML page:
$content=file_get_contents('test.html');

// divide HTML page content into sections, separated by the string "#separator#":
$section=explode('#separator#', $content);

// last item of two or more:
if(isset($_GET['section']) && count($section)>3 && $_GET['section']=='100'.count($section)-2)
{
    echo $section[(count($section)-2)].'
    <p>
    <a href="?section=100'.(count($section)-3).'">Previous</a>
    Next
    </p>
    ';
}

// items between the first and last:
else if(isset($_GET['section']) && $_GET['section']>1001 && $_GET['section']<'100'.count($section)-2)
{
    for($i=2; $i<(count($section)-2); $i++)
    {
        if($_GET['section']=='100'.$i)
        {
            echo $section[$i].'
            <p>
            <a href="?section=100'.($i-1).'">Previous</a>
            <a href="?section=100'.($i+1).'">Next</a>
            </p>
            ';
        }
    }
}

// first item of two or more:
else if(count($section)>3)
{
    echo $section[1].'
    <p>
    Previous
    <a href="?section=1002">Next</a>
    </p>
    ';
}

// single item:
else
{
    echo $section[1].'
    <p>
    Previous Next
    </p>
    ';
}

?>


Thanks again

Posted by: Baffled in Baltimore Feb 25 2009, 10:17 PM

QUOTE(Baffled in Baltimore @ Feb 25 2009, 11:16 AM) *


Regarding PHP

Addendum
What I would like to do is add an Image gallery to the beginning of the file. When the script calls the page, it starts with the image gallery. Then an image is selected, loading the appropriate details for that image. A gallery link needs to be added to the script allowing the user to go back to the gallery for another selection.

Thanks again.


Posted by: Christian J Feb 26 2009, 01:30 PM

QUOTE(Baffled in Baltimore @ Feb 26 2009, 04:17 AM) *

What I would like to do is add an Image gallery to the beginning of the file. When the script calls the page, it starts with the image gallery. Then an image is selected, loading the appropriate details for that image. A gallery link needs to be added to the script allowing the user to go back to the gallery for another selection.

Do you mean you want the gallery on a page of its own? Or do you want the gallery to show up on all detail pages?

BTW, the thumbnail gallery can be generated automatically. For example, the script might count the number of sections in the external file and create a link with an IMG element for each section. A possible disadvantage is that each image's file name must contain same number as the product, say "1001.jpg" or "pic_1001.jpg". Also the image's ALT text can't be made much more descriptive than say "Article no. 1001".

Posted by: Baffled in Baltimore Mar 26 2009, 01:00 PM

Hello Christian, J

Please forgive my lengthy absence; vision went out for awhile. Thanks for your reply, your suggestion sounds good. If your idea includes using pre-existing targeted content from a given category page, sure! lets try it; please keep in mind, any images I target are URL's to differing sub-directories from my supplier's server. This method was used because I had no server-side access at the time my site was written (but I do now) and saw no point in duplication; downloading thousands of images was out of the question.

I would like to switch-up a little by asking your help in a twist to the same theme by combining the functionality of the jscript you provided (Prev - Gallery - Next) with the characteristics of the PHP script (1-at-a-time, displays links at bottom) by adding the gallery link to the PHP and moving the displayed links to the top of each file.

The idea is to replace the Gallery with a Table of Contents, and the TOC is a set of text links to all Category Pages. This would be similar in function to what was already done; show 1 item at a time.

When the user clicks the Catalog link from any of the main pages, the PHP is opened starting with the Table of Contents instead of a gallery. What I would like to try; is either combine the toc and all category pages into one file, or have the Table of Contents as a seperate file and use PHP for displaying whatever category is selected from the TOC. I believe the latter notion would be preferred to reduce bandwidth and minimize download time.

The category pages are set up as DIV'd content consisting of all images and content for that category. Only the images and their content are set-up and displayed as a list for each category page. A working example page can be found http://www.wjstewart-associates.com/index_files/1400.htm.

In re-deployment of this site, an error occured during the transfer, deleting many of the original files. This left me with uploading a different site written with Publisher. Not a good choice. It was something I was toying with earlier on but became a backup; the only one I managed to recover when local drive was replaced. I'll be going back to the original theme whrn I can implement the PHP idea.

Anyhow; The following is the PHP script you provided for displaying 1-at-a-time. This is what I'd like a 3rd link added to and all links to be displayed at the top of each page. thanks again

CODE
<?php

// content of the remote HTML page:
$content=file_get_contents('test.html');

// divide HTML page content into sections, separated by the string "#separator#":
$section=explode('#separator#', $content);

// last item of two or more:
if(isset($_GET['section']) && count($section)>3 && $_GET['section']=='100'.count($section)-2)
{
    echo $section[(count($section)-2)].'
    <p>
    <a href="?section=100'.(count($section)-3).'">Previous</a>
    Next
    </p>
    ';
}

// items between the first and last:
else if(isset($_GET['section']) && $_GET['section']>1001 && $_GET['section']<'100'.count($section)-2)
{
    for($i=2; $i<(count($section)-2); $i++)
    {
        if($_GET['section']=='100'.$i)
        {
            echo $section[$i].'
            <p>
            <a href="?section=100'.($i-1).'">Previous</a>
            <a href="?section=100'.($i+1).'">Next</a>
            </p>
            ';
        }
    }
}

// first item of two or more:
else if(count($section)>3)
{
    echo $section[1].'
    <p>
    Previous
    <a href="?section=1002">Next</a>
    </p>
    ';
}

// single item:
else
{
    echo $section[1].'
    <p>
    Previous Next
    </p>
    ';
}

?>



I am open to suggestions;
Thanks again for your help...

Posted by: Baffled in Baltimore Mar 30 2009, 08:34 AM

QUOTE(Christian J @ Feb 26 2009, 02:30 PM) *

QUOTE(Baffled in Baltimore @ Feb 26 2009, 04:17 AM) *

What I would like to do is add an Image gallery to the beginning of the file. When the script calls the page, it starts with the image gallery. Then an image is selected, loading the appropriate details for that image. A gallery link needs to be added to the script allowing the user to go back to the gallery for another selection.

Do you mean you want the gallery on a page of its own? Or do you want the gallery to show up on all detail pages?

BTW, the thumbnail gallery can be generated automatically. For example, the script might count the number of sections in the external file and create a link with an IMG element for each section. A possible disadvantage is that each image's file name must contain same number as the product, say "1001.jpg" or "pic_1001.jpg". Also the image's ALT text can't be made much more descriptive than say "Article no. 1001".

Hello again Christian, J;
I'm sorry, I missed what you asked before. The idea is to have a link available so that the gallery can be called at any time. I mention Gallery out of habit; the Gallery will be replaced with a Table of Contents and the DIV'd content will be replaced with one page div'd in the same way except one section will be a category listing instead of a single item.
The problem with this idea is it will make for a slower download if one large file is used. The category pages are currently saved as seperate HTML files but unsure how to load in a specific category page with PHP; especially when linked from the Table of contents page. I would like to maintain one file for the TOC and the category pages as seperate files. There may be roughly 30-pages total with the TOC available by link from whatever Category page is viewed. An alternate would be to have the TOC side-barred when the PHP script is called for the Category pages. The example page depicted in previous post is how the page would display when called.

That's the idea anyway; I hope this clears it up.

Thanks again;

Posted by: Christian J Mar 30 2009, 06:20 PM

Sorry, I've been a bit busy lately (still am). Maybe you could hire someone else to do this for you?

Posted by: Baffled in Baltimore Mar 31 2009, 08:11 AM

QUOTE

Maybe you could hire someone else to do this for you?
Can't afford it; dissability... It's a shame too, I even had to drop my accademic endeavours

I realize there is only so much that can be done here and this is probably a tall order;
Prognosis is maybe a couple of years before total blindness sets in. My girlfriend wants to administrate, but if it involves anything outside the 26-letters of the alphabit, she's further in the dark than I am. At least I have some programming experience; it's outdated (about 30-yrs) and mostly forgotten, but is there. Certain characters I can't see anymore but with some prodding, I believe some of what was lost will come back; maybe to the point of eventually bringing this to culmination on my own.

Bits and chunks in whatever time frame you can spare is all I ask; no hurry.
As long as there is black paint on a white canvas, I can still read it (most of it anyway).

Sorry to be a pain
and Thank you...

Posted by: Baffled in Baltimore Mar 31 2009, 10:56 AM

I recovered a test file http://www.wjstewart-associates.com/shop/gallery/content/auto1.php.
It is the PHP that loads in the Table of Contents and combined category pages separated with the #separator# string. The file it looks for is found http://www.wjstewart-associates.com/shop/gallery/content/test.html

The TOC links to the appropriate categories but only when opened on its' own (without the PHP script.) One of the problems I am having is linking under PHP. It would be very helpful if you can assist with this one.

The 3rd link I seek is to cover the Table of Contents. This would be added to the existing Prev - Next links It would be better if the links can be moved to the top of file when displayed; this will prevent the need to scroll the whole section before encountering the links again.

Again, this is a test file with ALL combined content but individual files exist and is preferred to use this method but I don't know how to target them using the script. Display 'One-at-a-time' still holds so PHP is used.

Site will remain mostly static, only SOME server-side scripting functions are needed; at least until I can afford to have it professionally done.

Thanks again

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)