Grrr I hate tables!!! - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: Grrr I hate tables!!!

Quoted text here. Click to load it

Choosing a DOCTYPE:

4.01 strict works for me.

Whatever you do - do something.

Re: Grrr I hate tables!!!

Viper wrote:
Quoted text here. Click to load it

Take a look at this form:

    <form action=" ">
          <b>Product Search:</b>
      <input type="hidden" name="searchtype" value="product">
      <input name="prod">
      <input type="submit">

Imagine searching for "123" using that script, it will jump to this URL:

Simple enough, right? Now, imagine we want to put a plain text link to
that page:

    <a href=" "
    title="A widget">Product 123</a>

Still looks fine, right? Wrong! You might not know it, but "&prod;" is the
entity for a mathematical symbol called the N-ary product, which looks a
bit like a capital letter pi (lets see if your newsreader/OS/font is good

    &prod; = ∏

In some situations, entities can be written without their trailing
semicolons, so:

    &prod = ∏

So the link you wrote above, will actually be interpreted as: ∏=123

So the "search.cgi" script will end up with the following variables:

    $searchtype = 'product∏=123';
    $product = '';

These ambiguities are rare, but the inventors of SGML and HTML decided
that it was best to avoid them and make all unencoded &-signs invalid.

And so the address above:

Is written in HTML like this:

    <a href=" ;prod=123"
    title="A widget">Product 123</a>

Note -- the real URL doesn't have "&amp;" in it. It still as a plain
&-sign. It's just the HTML *representation* of the URL that needs the

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~

Re: Grrr I hate tables!!!

Baho Utot wrote:
Quoted text here. Click to load it

I couldnt careless what they think is valid or not. If the page displays in
IE I am happy.

Are you seeking revenge?

Site Timeline