GM Hockey
Would you like to react to this message? Create an account in a few clicks or log in to continue.
GM Hockey

You are not connected. Please login or register

Any HTML code junkies out there want to have a look?

5 posters

Go down  Message [Page 1 of 1]

Cap'n Clutch

Cap'n Clutch
Co-Founder
Co-Founder

I had this posted on the main forum until I started tinkering. I had to remove it because it was hiding the categories on the main index page. Have a look if you are interested.

Code:
<strong>Eastern Conference</strong>
<br>
<A href="http://www.gmhockey.com/atlanta-thrashers-f12" target=_blank><IMG src="http://cdn.nhl.com/thrashers/images/logos/small.png" alt="atalnta thrashers"></A>

<A href="http://www.gmhockey.com/boston-bruins-f13" target=_blank><IMG src="http://cdn.nhl.com/bruins/images/logos/small.png" alt="boston bruins"></A>

<A href="http://www.gmhockey.com/buffalo-sabres-f14" target=_blank><IMG src="http://cdn.nhl.com/sabres/images/logos/small.png" alt="buffalo sabres"></A>

<A href="http://www.gmhockey.com/carolina-hurricanes-f15" target=_blank><IMG src="http://cdn.nhl.com/hurricanes/images/logos/small.png" alt="carolina hurricanes"></A>

<A href="http://www.gmhockey.com/florida-panthers-f23" target=_blank><IMG src="http://cdn.nhl.com/panthers/images/logos/small.png" alt="florida panthers"></A>

<A href="http://www.gmhockey.com/montreal-canadiens-f26" target=_blank><IMG src="http://cdn.nhl.com/canadiens/images/logos/small.png" alt="montreal canadiens"></A>

<A href="http://www.gmhockey.com/new-jersey-devils-f28" target=_blank><IMG src="http://cdn.nhl.com/devils/images/logos/small.png" alt="new jersey devilsislanders"></A>

<A href="http://www.gmhockey.com/new-york-islanders-f29" target=_blank><IMG src="http://cdn.nhl.com/islanders/images/logos/small.png" alt="new york islanders"></A>

<A href="http://www.gmhockey.com/new-york-rangers-f30" target=_blank><IMG src="http://cdn.nhl.com/rangers/images/logos/small.png" alt="new york rangers"></A>

<A href="http://www.gmhockey.com/ottawa-senators-f31" target=_blank><IMG src="http://cdn.nhl.com/senators/images/logos/small.png" alt="ottawa senators"></A>

<A href="http://www.gmhockey.com/philadelphia-flyers-f32" target=_blank><IMG src="http://cdn.nhl.com/flyers/images/logos/small.png" alt="philadelphia flyers"></A>

<A href="http://www.gmhockey.com/pittsburgh-penguins-f34" target=_blank><IMG src="http://cdn.nhl.com/penguins/images/logos/small.png" alt="pittsburgh penguins"></A>

<A href="http://www.gmhockey.com/tampa-bay-lightning-f37" target=_blank><IMG src="http://cdn.nhl.com/lightning/images/logos/small.png" alt="tampa bay lightning"></A>

<A href="http://www.gmhockey.com/toronto-maple-leafs-f38" target=_blank><IMG src="http://cdn.nhl.com/mapleleafs/images/logos/small.png" alt="toronto maple leafs"></A>

<A href="http://www.gmhockey.com/washington-capitals-f40" target=_blank><IMG src="http://cdn.nhl.com/capitals/images/logos/small.png" alt="washington capitals"></A>
<br><br>
<strong>Western Conference</strong>
<br>
<A href="http://www.gmhockey.com/anaheim-ducks-f11" target=_blank><IMG src="http://cdn.nhl.com/ducks/images/logos/small.png"alt="anaheim ducks"></A>

<A href="http://www.gmhockey.com/calgary-flames-f16" target=_blank><IMG src="http://cdn.nhl.com/flames/images/logos/small.png" alt="calgary flames"></A>

<A href="http://www.gmhockey.com/chicago-black-hawks-f17" target=_blank><IMG src="http://cdn.nhl.com/blackhawks/images/logos/small.png" alt="chicago blackhawks"></A>

<A href="http://www.gmhockey.com/colorado-avalanche-f19" target=_blank><IMG src="http://cdn.nhl.com/avalanche/images/logos/small.png" alt="colorado avalanche"></A>

<A href="http://www.gmhockey.com/columbus-blue-jackets-f18" target=_blank><IMG src="http://cdn.nhl.com/bluejackets/images/logos/small.png" alt="columbus blue jackets"></A>

<A href="http://www.gmhockey.com/dallas-stars-f20" target=_blank><IMG src="http://cdn.nhl.com/stars/images/logos/small.png" alt="dallas stars"></A>

<A href="http://www.gmhockey.com/detroit-red-wings-f21" target=_blank><IMG src="http://cdn.nhl.com/redwings/images/logos/small.png" alt="detroit redwings red wings"></A>

<A href="http://www.gmhockey.com/edmonton-oilers-f22" target=_blank><IMG src="http://cdn.nhl.com/oilers/images/logos/small.png" alt="edmonton oilers"></A>

<A href="http://www.gmhockey.com/los-angeles-kings-f24" target=_blank><IMG src="http://cdn.nhl.com/kings/images/logos/small.png" alt="los angeles kings"> </A>

<A href="http://www.gmhockey.com/minnesota-wild-f25/" target=_blank><IMG src="http://cdn.nhl.com/wild/images/logos/small.png" alt="minnesota wild"></A>

<A href="http://www.gmhockey.com/nashville-predators-f27" target=_blank><IMG src="http://cdn.nhl.com/predators/images/logos/small.png" alt="nashville predators"></A>

<A href="http://www.gmhockey.com/phoenix-coyotes-f33" target=_blank><IMG src="http://cdn.nhl.com/coyotes/images/logos/small.png" alt="phoenix coyotes"></A>

<A href="http://www.gmhockey.com/san-jose-sharks-f35" target=_blank><IMG src="http://cdn.nhl.com/sharks/images/logos/small.png" alt="san jose sharks"></A>

<A href="http://www.gmhockey.com/st-louis-blues-f36" target=_blank><IMG src="http://cdn.nhl.com/blues/images/logos/small.png" alt="vancouver canucks"></A>

<A href="http://www.gmhockey.com/vancouver-canucks-f39" target=_blank><IMG src="http://cdn.nhl.com/canucks/images/logos/small.png"></A>
<br><br>
<STRONG><FONT size=6>NHL Playoffs <BR><BR>
<FONT color=red>16 teams ... 1 Cup</FONT> </FONT></STRONG><BR><BR><BR><A href="http://www.gmhockey.com/all-things-playoffs-f52/all-playoff-talk-all-the-time-t4393-40.htm">All playoff talk, all the time</A> <BR><STRONG>Join the best NHL Playoffs hockey discussion on the web. </STRONG><BR><BR><A href="http://www.gmhockey.com/ottawa-centaurs-f31/robin-lehner-interview-t4178.htm">ROBIN LEHNER INTERVIEW! EXCLUSIVE TO GMHOCKEY!</A> <BR><BR><STRONG><A href="http://www.gmhockey.com/chatbox/chatbox.forum?">CHAT ROOM</A> <IMG src="http://2img.net/i/fa/prosilver/arrow_left.gif"> <IMG src="http://2img.net/i/fa/prosilver/arrow_right.gif"> <A href="http://twitter.com/gmhockey">TWITTER</A> <BR><BR></p></STRONG>
<STYLE type=text/css>



Last edited by Cap'n Clutch on Thu May 06, 2010 10:14 am; edited 1 time in total


_________________
"A child with Autism is not ignoring you, they are waiting for you to enter their world."

- Unknown Author

PTFlea

PTFlea
Co-Founder
Co-Founder

Try this:

rhgouie4w90utr3904mnv /djjjojopkjds/wiener/dlnflkgnlkflkgfl;;/ddd

That should do it for you. Any HTML code junkies out there want to have a look? 805406

wprager

wprager
Administrator
Administrator

You didn't have the code tags in the PM you sent me. I can actually read that.

There are two things I see up there that don't make sense. First, you have paragraph end tag (< /p >) with no corresponding start tag. I'd just remove it. Second, there's a STYLE tag that probably doesn't do anything.


_________________
Hey, I don't have all the answers. In life, to be honest, I've failed as much as I have succeeded. But I love my wife. I love my life. And I wish you my kind of success.
- Dicky Fox

Cap'n Clutch

Cap'n Clutch
Co-Founder
Co-Founder

wprager wrote:You didn't have the code tags in the PM you sent me. I can actually read that.

There are two things I see up there that don't make sense. First, you have paragraph end tag (< /p >) with no corresponding start tag. I'd just remove it. Second, there's a STYLE tag that probably doesn't do anything.

All I know is whatever problem was there it caused the index to completely disappear. How the frank can code in that little box have that much power?


_________________
"A child with Autism is not ignoring you, they are waiting for you to enter their world."

- Unknown Author

SeawaySensFan

SeawaySensFan
Franchise Player
Franchise Player

Cap'n Clutch wrote:
wprager wrote:You didn't have the code tags in the PM you sent me. I can actually read that.

There are two things I see up there that don't make sense. First, you have paragraph end tag (< /p >) with no corresponding start tag. I'd just remove it. Second, there's a STYLE tag that probably doesn't do anything.

All I know is whatever problem was there it caused the index to completely disappear. How the frank can code in that little box have that much power?

Any HTML code junkies out there want to have a look? 49849

wprager

wprager
Administrator
Administrator

Cap'n Clutch wrote:
wprager wrote:You didn't have the code tags in the PM you sent me. I can actually read that.

There are two things I see up there that don't make sense. First, you have paragraph end tag (< /p >) with no corresponding start tag. I'd just remove it. Second, there's a STYLE tag that probably doesn't do anything.

All I know is whatever problem was there it caused the index to completely disappear. How the frank can code in that little box have that much power?

It's actually very, very simple.

The site does not keep .html pages, it builds them on the fly. And it often builds them from "pieces". One of those pieces is the code inside the "generalities" text box in the display admin section. The BB codes get "translated" to corresponding HTML codes, special header/body/whatever codes are added around it and, voila, you've got yourself an HTML page that is sent from the server to the client (your browser). The client then interprets all of that, hoping for a well-formed HTML file.

Now, suppose you missed an end tag? Well, your browser would then continue processing the text, trying to find any parameters that the started tag could have, probably tossing most things out the window because they don't make sense, until it came to an end tag, after which point everything would be fine again. Or you could have an opening double quote with the closing one missing. It would continue interpreting everything as part of a text string until it found what it *thought* was a closing double-quote, but since that is actually an opening quote for another string, it would try to interpret that string as, very possibly, HTML tags -- and it would fail miserably.

Bottom line, in all of these formats where you have to have an opening/starting tag or character, and a corresponding opening/ending tag character, missing one can really, really screw you up.

I'm assuming that the engine that drives this site tries to make up for common mistakes (I think spurious end tags are not a problem, so why not throw in a bunch of end tags for the common text-processing stuff like font, size, etc). But it probably doesn't handle very possible case, and it might also have trouble with missing quotes (although it could certainly parse the 'generalities' text to verify that every opened tag is closed, every start tag has a matching end, and every quote has a mate.

But no matter how hard we (as programmers) may try, no program is fool-proof, because Mother Nature is very, very good at generating better fools.


_________________
Hey, I don't have all the answers. In life, to be honest, I've failed as much as I have succeeded. But I love my wife. I love my life. And I wish you my kind of success.
- Dicky Fox

wprager

wprager
Administrator
Administrator

Thinking back about it, maybe it was that spurious STYLE tag -- there was a start tag but no end tag.


I just tried putting that tag in just before the stats counter stuff and, sure enough, everyhing disappeared. Before you have a heart-attack, I took it out again and everything is fine. I've got two tabs side-by-side with the HOME page -- one bad, one good.

Case solved! Book it.


_________________
Hey, I don't have all the answers. In life, to be honest, I've failed as much as I have succeeded. But I love my wife. I love my life. And I wish you my kind of success.
- Dicky Fox

shabbs

shabbs
Hall of Famer
Hall of Famer

The infamous open ended tag issue... remember to always close your tags... code safely.

You can always try running it through an HTML validating process... it will identify tags that are not closed properly.

http://validator.w3.org/

wprager

wprager
Administrator
Administrator

Dang, link not working. Checked out w3.org website to see if maybe the link had changed, but all their links to the HTML validator (or markup validator) are also resulting in "Problem loading page".

I was hoping to test it with the code Clutch posted.


_________________
Hey, I don't have all the answers. In life, to be honest, I've failed as much as I have succeeded. But I love my wife. I love my life. And I wish you my kind of success.
- Dicky Fox

shabbs

shabbs
Hall of Famer
Hall of Famer

wprager wrote:Dang, link not working. Checked out w3.org website to see if maybe the link had changed, but all their links to the HTML validator (or markup validator) are also resulting in "Problem loading page".

I was hoping to test it with the code Clutch posted.
Link works fine for me... strange...

wprager

wprager
Administrator
Administrator

Must have been something temporary. It's working fine for me now.

It found 3 errors (none of which were a problem, I believe) and one warning (which was).

1. no document type declaration; will parse without validation
2. document type does not allow element "BR" here
3. end tag for element "P" which is not open
- this was one of the ones I caught but I don't think it's an issue

The warning was (I'll include the full text):

Line 67, Column 17: NET-enabling start-tag requires SHORTTAG YES

< STYLE type=text/css>
The sequence can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag '). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.


Umm, yeah, OK, sure. I would not understand that warning, but I guess it would have pointed me in the right direction. Maybe I need to change the validation parameters because, clearly, this is not *real* HTML code -- it's got no tags for defining the title/body or even to say that it's HTML, and it allows BB tags.


Edit: I've added a space to the STYLE tag to disable it as it "broke" this topic page (see following post for a quasi explanation).



Last edited by wprager on Fri May 07, 2010 12:57 pm; edited 1 time in total


_________________
Hey, I don't have all the answers. In life, to be honest, I've failed as much as I have succeeded. But I love my wife. I love my life. And I wish you my kind of success.
- Dicky Fox

wprager

wprager
Administrator
Administrator

OK, I just broke the page. Something in my last post (most likely part of what I copy/pasted from the validation output) has buggered-up this page. Everything in my post after the warning quick description (the line starting with "Line 67, Column 17" is gone, and the Quick Reply box is immediately below. Nothing to indicate where the posts end, no "Page x of y", not even the "Quick Reply" heading for the box I'm typing in currently.

WEEEEEIRD!

OK, I'll go back now and edit my previous post and remove whatever is screwing this up.


_________________
Hey, I don't have all the answers. In life, to be honest, I've failed as much as I have succeeded. But I love my wife. I love my life. And I wish you my kind of success.
- Dicky Fox

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum