Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Selecting text not working as expected

Reply
Thread Tools

Selecting text not working as expected

 
 
Jay
Guest
Posts: n/a
 
      11-06-2003
Hello all,

I have a page full of resources by state for people to contact local
centers. Sometimes when people visit our site they want to copy the contact
information and put it in an email so they select only the information they
wish to send.

We have recently redesigned our web site and now with the new design when
someone tries to select text from our site, it selects everything from the
cursor to the bottom of the page. It does this on all of our pages using IE
but not Netscape.

Here is a page to try it on: http://www.taalliance.org/Centers/region1.htm

Did I do something wrong in the markup? When I rewrote the pages I did them
in XHTML 1.1. Does that have anything to do with it? Could it just be an IE
bug?

Thank you,

- J




 
Reply With Quote
 
 
 
 
Bertilo Wennergren
Guest
Posts: n/a
 
      11-06-2003
Jay wrote:

> Here is a page to try it on: http://www.taalliance.org/Centers/region1.htm


> Did I do something wrong in the markup? When I rewrote the pages I did them
> in XHTML 1.1.


Not really. You've indicated XHTML 1.1 in the doctype declaration, but
you haven't followed the rules for XHTML 1.1.

> Does that have anything to do with it?


Probably.

> Could it just be an IE bug?


IE can't handle XHTML, and most certainly not (correctly done) XHTML 1.1.

Redo it in XHTML 1.0 Strict (in backwards compatibility mode) or HTML
4.01 Strict. Then validate it and correct all the errors. Most probably
that will solve your problem.

--
Bertilo Wennergren <(E-Mail Removed)> <http://www.bertilow.com>

 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      11-06-2003
Bertilo Wennergren wrote:

> Jay wrote:
>
>> Here is a page to try it on: http://www.taalliance.org/Centers/region1.htm

>
>> Did I do something wrong in the markup? When I rewrote the pages I did them
>> in XHTML 1.1.

>
> Not really. You've indicated XHTML 1.1 in the doctype declaration, but
> you haven't followed the rules for XHTML 1.1.


Not really. He's used:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

which is some freaky made-up DOCTYPE. Note: the URL points to XHTML 1.0
transitional and the identifier claims it's "XHTML 1.1 Transitional",
which doesn't exist.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
Jay
Guest
Posts: n/a
 
      11-06-2003
"Bertilo Wennergren" <(E-Mail Removed)> wrote in message
news:boe97c$lao$00$(E-Mail Removed)-online.com...
> Jay wrote:
>
> > Here is a page to try it on:

http://www.taalliance.org/Centers/region1.htm
>
> > Did I do something wrong in the markup? When I rewrote the pages I did

them
> > in XHTML 1.1.

>
> Not really. You've indicated XHTML 1.1 in the doctype declaration, but
> you haven't followed the rules for XHTML 1.1.


Which rules were not followed? It validates as XHTML 1.1 Transitional
(http://validator.w3.org/check?uri=ht....org%2Fcenters
%2Fregion1.htm).


 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      11-06-2003
Quoth the raven named Jay:

> "Bertilo Wennergren" <(E-Mail Removed)> wrote in message
> news:boe97c$lao$00$(E-Mail Removed)-online.com...
>
>> Jay wrote:
>>
>>> Here is a page to try it on:

>
> http://www.taalliance.org/Centers/region1.htm
>
>>> Did I do something wrong in the markup? When I rewrote the
>>> pages I did them in XHTML 1.1.

>>
>> Not really. You've indicated XHTML 1.1 in the doctype
>> declaration, but you haven't followed the rules for XHTML 1.1.

>
>
> Which rules were not followed? It validates as XHTML 1.1
> Transitional
> (http://validator.w3.org/check?uri=ht....org%2Fcenters
> %2Fregion1.htm).


According to: http://www.w3.org/QA/2002/04/valid-dtd-list.html
there is _no_ XHTML 1.1 *Transitional*

Tho you're right. The validator thinks so...

--
-bts
-This space intentionally left blank.

 
Reply With Quote
 
Bertilo Wennergren
Guest
Posts: n/a
 
      11-06-2003
Beauregard T. Shagnasty wrote:

> Quoth the raven named Jay:


>> "Bertilo Wennergren" <(E-Mail Removed)> wrote in message
>> news:boe97c$lao$00$(E-Mail Removed)-online.com...


>> http://www.taalliance.org/Centers/region1.htm


>>>> Did I do something wrong in the markup? When I rewrote the
>>>> pages I did them in XHTML 1.1.


>>> Not really. You've indicated XHTML 1.1 in the doctype
>>> declaration, but you haven't followed the rules for XHTML 1.1.


>> Which rules were not followed? It validates as XHTML 1.1
>> Transitional
>> (http://validator.w3.org/check?uri=ht....org%2Fcenters
>> %2Fregion1.htm).


> According to: http://www.w3.org/QA/2002/04/valid-dtd-list.html
> there is _no_ XHTML 1.1 *Transitional*


> Tho you're right. The validator thinks so...


This is actually quite amusing.

The page has this at the top:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Notice "XHTML 1.1 Transitional". There is no such thing.

Notice the URL:

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd".

That's the URL of the DTD for XHTML 1.0 Transitional. Not the same thing.

The doctype declaration should thus be:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I'm surprised that the validator accepts that without any hint that
something is not normal. Anyway...

The page still does not follow all the rules, even though the validator
says it's valid. There are other rules.

It's however unlikely that a lack of the attribute "xml:lang" besides
"lang" could cause the problems originally described. (If the code had
really been XHTML 1.1 there would have been more problems, and the page
would not have been valid.)

So it must be some more commonplace bug in IE.

The doctype declaration should still be fixed.

--
Bertilo Wennergren <(E-Mail Removed)> <http://www.bertilow.com>

 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      11-06-2003
"Beauregard T. Shagnasty" <(E-Mail Removed)> wrote:
>Quoth the raven named Jay:
>> "Bertilo Wennergren" <(E-Mail Removed)> wrote:
>>
>> Which rules were not followed? It validates as XHTML 1.1
>> Transitional
>> (http://validator.w3.org/check?uri=ht....org%2Fcenters
>> %2Fregion1.htm).

>
>According to: http://www.w3.org/QA/2002/04/valid-dtd-list.html
>there is _no_ XHTML 1.1 *Transitional*
>
>Tho you're right. The validator thinks so...


Well sort of.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

As the FPI is for a non-existent flavour of (X)HTML the validator
treats it as an unknown doctype and loos to the URI provided, which is
for XHTML 1.0 Transitional.

Forcing an override to 1.1 shows that it fails validation.
Forcing an override to 1.0 Trans shows that it passes.

Though the results page does say XHTML 1.1 Transitional which is
misleading but is a symptom of the malformed doctype rather than a
bug.

Note that it says "This Page Is Valid -//W3C//DTD XHTML 1.1
Transitional//EN!" rather than "This Page Validates As XHTML 1.1
Transitional!" which is the message that would occur if 1.1 Trans did
exist. After all I just got a page to validate and give the message
"This Page Is Valid -//W3C//DTD XHTML 1.1 Fluffy//EN!"

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
Jay
Guest
Posts: n/a
 
      11-06-2003

"Beauregard T. Shagnasty" <(E-Mail Removed)> wrote in message
news:CYyqb.61750$(E-Mail Removed)...
> Quoth the raven named Jay:
>
> > "Bertilo Wennergren" <(E-Mail Removed)> wrote in message
> > news:boe97c$lao$00$(E-Mail Removed)-online.com...
> >
> >> Jay wrote:
> >>
> >>> Here is a page to try it on:

> >
> > http://www.taalliance.org/Centers/region1.htm
> >
> >>> Did I do something wrong in the markup? When I rewrote the
> >>> pages I did them in XHTML 1.1.
> >>
> >> Not really. You've indicated XHTML 1.1 in the doctype
> >> declaration, but you haven't followed the rules for XHTML 1.1.

> >
> >
> > Which rules were not followed? It validates as XHTML 1.1
> > Transitional
> >

(http://validator.w3.org/check?uri=ht....org%2Fcenters
> > %2Fregion1.htm).

>
> According to: http://www.w3.org/QA/2002/04/valid-dtd-list.html
> there is _no_ XHTML 1.1 *Transitional*
>
> Tho you're right. The validator thinks so...


I changed it back to XHTML 1.0 in the doctype but that doesn't fix the
problem.
The issue must be happening because of the XHTML markup because when I
converted it back to HTML 4.01 the issue is gone.

- J


 
Reply With Quote
 
Bertilo Wennergren
Guest
Posts: n/a
 
      11-06-2003
Jay:

> I changed it back to XHTML 1.0 in the doctype but that doesn't fix the
> problem.
> The issue must be happening because of the XHTML markup because when I
> converted it back to HTML 4.01 the issue is gone.


MSIE doesn't know what XHTML is. It manages to handle the code just
because it's so similar to HTML 4. That's one of the main ideas with
XHTML 1.0: It should work in older (tag-soup) browsers, that don't even
know what it is. (Not so for XHTML 1.1.)

But you seem to have managed to trigger some kind of problem in MSIE
anyway. It would be interesting to find out what it is. Strip down the
page, step by step, until you find the minimum code that will trigger
the problem.

--
Bertilo Wennergren <(E-Mail Removed)> <http://www.bertilow.com>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting DDL item based on TEXT? Why isn't this working? darrel ASP .Net 4 08-17-2007 03:15 PM
'text/html' expected 'text/xml' WebService error Saya ASP .Net 0 08-19-2005 11:57 AM
Error: content type of 'text/html; but expected 'text/xml'. ramarnath@gmail.com ASP .Net 1 08-16-2005 09:07 AM
Re: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml' Damon Payne ASP .Net 0 03-08-2005 02:35 AM
WebService-Error: "the found request-type is 'text/html; charset=utf-8', but 'text/xml' was expected" ASP .Net 0 02-20-2004 03:37 PM



Advertisments