|
|
|||
|
|
The WebRing.com System
Mixing SSNB JavaScript and Native HTML Code This page explains how to easily mix SSNB JavaScript and native HTML Code for webrings in the WebRing.com system, and specifically, how to mix them on the same page.
What Is the Problem?
The WebRing.com system supports both JavaScript based Server Side Navigation Bars (SSNBs) and also the use of native HTML for coding the navigation bars. Some webrings require the use of the SSNB JavaScript, others require the use of native HTML and still others permit either to be used. So far, there is no problem. But if you attempt to "mix" both native HTML and SSNB JavaScript on the same page, you can encounter a problem. The problem is that the navbars that are coded in native HTML are "duplicated" by the SSNB JavaScript and appear twice on the page. Let's See an Example Let's say that you have membership in two webrings:
You register both of these webrings to this URL:
Then for The HTML Webring, you put native HTML code on your page. And, for The JavaScript Webring, you put the SSNB JavaScript on your page. Guess what! The SSNB JavaScript shows two navbars: one for each of the webrings. The navbar for The HTML Webring is duplicated. This is a problem. What Causes the Problem? When you register a page for a webring in the WebRing.com system, it assigns that membership to a "stack". All webrings that you register to the same URL share the same "stack". The SSNB JavaScript delivers all the navbars for all the webrings that are in a stack. And this is what causes the problem. What Is the General Solution? Putting a particular webring into a separate stack is pretty easy to do, as long as you know two tricks:
Trick #1: How WebRing.com Groups Webrings First, you need to know how WebRing.com groups webrings. Many people think that WebRing.com creates a separate stack for each page. But this is not true. It creates a separate stack for each unique URL, even if the two URLs point to the same page. Consider these three URLs:
Each of these URLs points to the exact same page. But, if you registered four webrings, one to each URL, you would get four unique stacks and four sets of JavaScript code. Even little differences, like capitalization make a difference to WebRing.com Trick #2: How Bookmarks Work HTML allows for things called "bookmarks". Bookmarks are a way to go to separate places on the same page. Suppose you had a very long page named
Now suppose that one page had three sections. You might create three bookmarks named
Then, you would reference each section this way:
Don't get too hung up on this. What we are going to do is to create a dummy bookmark. Here is the great thing. Suppose that you reference a bookmark that doesn't exist. If you do, the browser just goes to the top of the page. For example, on that page I told you about above, if you used this URL
the browser would go to the top of the page because the page doesn't actually have a bookmark named Section4. Any time you reference a bookmark that does not exist, the browser just goes to the top of the page Putting the Two Tricks Together Now that we understand Trick #1 and Trick #2, we can use "bookmarks" to make the URL "different" and cause WebRing.com to create a separate stack for the webring. Here is the background: Consider these two different URLs:
These two URLs are different. Because the only difference is the bookmark ("#separate") they both actually point to the same page. Not only that, because the bookmark ("#separate") doesn't actually appear on the page, the second URL will point to the top of the page, just like the first URL does. However, because they are, in fact, different, WebRing.com will assign unique stacks for these two URLs . . . even though they refer to the same page. So, what you do is to add a bookmark to the URL for the particular webring you want to appear in a separate stack. For example, if your registered page is:
you could add a bookmark like this
That will cause the WebRing.com system to put this webring in a stack by itself. Again, the reason is that WebRing.com creates a separate stack for each unique URL. Some people think it creates a separate stack for each page. But this is not true. It creates a separate stack for each unique URL, even if the two URLs point to the same page. After you create a separate stack for the webring, get the new code for this new stack and put it on your page. What Is the Specific Solution? Well, that depends. I've got recommendations for two different cases:
If you normally use native HTML and encounter a webring that requires the use of SSNB JavaScript, then create a second stack for your page by adding "#ssnb" to your URL. For example, if your "normal" URL is
then your "special" URL would be
Use this second special URL to register all webrings that require SSNB JavaScript. This will prevent duplication. And, it will be easy to remember.
If you normally use SSNB JavaScript and encounter a webring that requires the use of native HTML, then create a second stack for your page by adding "#html" to your URL. For example, if your "normal" URL is
then your "special" URL would be
Use this second special URL to register all webrings that require native HTML. This will prevent duplication. And, it will be easy to remember. Is That All It Takes? Yes. That is all it takes. It isn't hard. It is actually, pretty easy. And, I'm here to help. If you have any questions, feel free to email me. Why I Require SSNB JavaScript I have a page on my site that explains why I require SSNB JavaScript and do not permit the use of native HTML. Click here to go to that page.
A
Personal Note:
I'm sorry. While I have long adopted webrings in the WebRing.com system, because of the Oct.2006 changes, I am no longer doing that. However, please note that "deleting" your webring is a fruitless exercise. The system will just restore it and place it up for adoption.
Articles About the WebRing.com System Webring Sections and Subsections The Webring Section is a large section of my website. I have divided it into four major "subsections".
Each "subsection" has it's own special "logo". As you travel in the various subsections you will find, near the bottom of each page, links to pages within that subsection and also links to the other subsections. To go to any subsection, just click on the "logo" or on the text link for that subsection.
Webrings: General Information This subsection includes general information about webrings. Webrings can be hosted by a variety of different services. This section deals with the overall concepts and issues, not with any one particular "brand" of webring. It includes my Webring FAQ, links to articles about webrings, and general help information. Click here or on the graphic.
The Wazillion Navbars Project This subsection is a historical section about the Yahoo! WebRing system. It was begun during the early days of problems with the Yahoo! WebRing system in September 2000. It ended when the Yahoo! WebRing system spun off into the independent WebRing.com system in October 2001. I maintain it for the historical record. Click here or on the graphic.
Webrings I Own and Belong To This subsection shows all the webrings I own and links to all the webrings to which I belong. This includes webrings in Ringlink, RingSurf, Bravenet and the WebRing.com system as well. If you are looking to join one of my webrings, this is a good place to start. If you wonder about the webrings I belong to, this is the place to go. Click here or on the graphic. |
|
This page created: Sun, 26.Jan.2003
Last updated: |
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|