Is there another way to do this so it will validate.

P

Paul

HI! I use the following to redirect the user to another page if they do have
JavaScript turned on but it will not validate at w3c.org with the following
doc type.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<noscript>
<meta http-equiv="refresh"
content="1;URL=http://www.webcandesign.com/index.html">
</noscript>


Is there another way of acomplishing this?

Paul
 
C

Chris Leeds, MVP - FrontPage

what errors and warnings are you getting?
have you just put snippets of the page here or the whole thing.


--
Have you seen ContentSeed (www.contentseed.com)?
--
Chris Leeds
Contact: http://chrisleeds.com/contact

NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to email
addresses in public newsgroups.
Sorry for any inconvenience.
 
M

Murray

What's not valid about it is that you cannot have <noscript> tags in the
head of the page, which is where (I assume) you are trying to put this.

The best way to do this would be to just have a javsacript redirection
script - if js is on, it redirects. If it's off, it doesn't.

Actually, the best way would be to not use redirection at all!
 
P

Paul

Chris said:
what errors and warnings are you getting?
have you just put snippets of the page here or the whole thing.


--
Have you seen ContentSeed (www.contentseed.com)?

NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to email
addresses in public newsgroups.
Sorry for any inconvenience.

HI! Thanks for responding. the full error is below that I get when I try to
validate.

---------Error-------------
Error Line 5 column 9: document type does not allow element "NOSCRIPT" here.
<noscript>The element named above was found in a context where it is not
allowed. This could mean that you have incorrectly nested elements -- such
as a "style" element in the "body" section instead of inside "head" -- or
two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML
documents. Due to HTML's rules of implicitly closed elements, this error can
create cascading effects. For instance, using XHTML's "self-closing" tags
for "meta" and "link" in the "head" section of a HTML document may cause the
parser to infer the end of the "head" section and the beginning of the
"body" section (where "link" and "meta" are not allowed; hence the reported
error).

---------End OF Error-----------



Paul
 
P

Paul

Murray said:
What's not valid about it is that you cannot have <noscript> tags in the
head of the page, which is where (I assume) you are trying to put this.

The best way to do this would be to just have a javsacript redirection
script - if js is on, it redirects. If it's off, it doesn't.

Actually, the best way would be to not use redirection at all!

HI! Murry, Actually I do use a redirect. but what if the user enters in
through a saved link? The above method does work however but it just does
not validate. If there is another way that if the user tried to enter in any
page in the site without Javascript turned on I would like to bring him to a
page to warn him/her that the site will not function without it turned on.

ps. the noscript tag is in the head section. if there is another way by
putting a similar thing in the body then that would do?

Paul
 
C

Chris Leeds, MVP - FrontPage

my best recommendation would be to start with a valid page, then add your
JavaScript redirect.
I don't think the doctype is even correct on the example you posted.

--
Have you seen ContentSeed (www.contentseed.com)?
--
Chris Leeds
Contact: http://chrisleeds.com/contact

NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to email
addresses in public newsgroups.
Sorry for any inconvenience.
 
P

Paul

Paul said:
HI! I use the following to redirect the user to another page if they do
have JavaScript turned on but it will not validate at w3c.org with the
following doc type.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<noscript>
<meta http-equiv="refresh"
content="1;URL=http://www.webcandesign.com/index.html">
</noscript>


Is there another way of acomplishing this?

Paul

I figuire if I can use a server side redirect then this might work for me
since the other does not validate.

Sort of a noscript redirection for asp. is there such a thing or similiar
thing?

Paul
 
P

Paul

Chris said:
my best recommendation would be to start with a valid page, then add your
JavaScript redirect.
I don't think the doctype is even correct on the example you posted.

--
Have you seen ContentSeed (www.contentseed.com)?

NOTE:
This message was posted from an unmonitored email account.
This is an unfortunate necessity due to high volumes of spam sent to email
addresses in public newsgroups.
Sorry for any inconvenience.

HI! Thanks for your response. Actually I do use a redirect and it works
fine. This however is for all my pages to prevent them from entering from a
saved bookmark. At the moment the meta tag works fine however it does not
validate. I am searching for an alternative that would validate.

Paul
 
M

Murray

<body>
<noscript><h1 style="color:red; ">THIS SITE REQUIRES THE USE OF JAVASCRIPT
TO FUNCTION PROPERLY. PLEASE ENABLE IT BEFORE PROCEEDING</h1></noscript>
 
T

Thomas A. Rowe

VBScript is only supported in IE browsers running under Windows.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================
 
P

Paul

Murray said:
Yes, but why bother?

HI! I want to bother because I need to know if the user has come in through
a bookmark. and if he did come though a bookmark then I need to redirect
him/her to another page. as of now I do know a way but it doesn ot validate
in w3c.org and that's why I am posting this question. sorry if I did not
make myself clear before.

Paul
 
M

Mike Mueller

: Murray wrote:
: > The server cannot know if the client has js enabled, you
know?
: >
: >
: > : >> Paul wrote:
: >>> HI! I use the following to redirect the user to
another page if they do
: >>> have JavaScript turned on but it will not validate at
w3c.org with the
: >>> following doc type.
: >>>
: >>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
: >>>
: >>> <noscript>
: >>> <meta http-equiv="refresh"
: >>>
content="1;URL=http://www.webcandesign.com/index.html">
: >>> </noscript>
: >>>
: >>>
: >>> Is there another way of acomplishing this?
: >>>
: >>> Paul
: >>
: >> I figuire if I can use a server side redirect then this
might work for me
: >> since the other does not validate.
: >>
: >> Sort of a noscript redirection for asp. is there such a
thing or similiar
: >> thing?
: >>
: >> Paul
:
: Onless its been passed something from vb script?
:
: Paul


VBScript will only run clientside on a PC with IE- any other
OS/browser combos will not do it
-and if someone is disabling their javscript on an IE-PC, do
you really think they would have vbscripting available to
check?

I still think you should do the page as the non-js-enabled
version, and use a js redirect if js was available/enabled
 
K

Kathleen Anderson [MVP - FrontPage]

Paul said:
HI! I want to bother because I need to know if the user has come in
through a bookmark. and if he did come though a bookmark then I need to
redirect him/her to another page. as of now I do know a way but it doesn
ot validate in w3c.org and that's why I am posting this question. sorry if
I did not make myself clear before.

Paul:

Try this. First, change the DOCTYPE on your page to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Then in the <head> section of your page; add this:

<meta http-equiv="refresh" content="6; URL=http://www.yourwebsite.com">

The value given to 'content' is the number of seconds before the refresh
will take place; the value given to 'URL' is the page you want your visitor
sent to. You may also want to include a text link to the page in case your
visitor's browser does not support the 'refresh'.

Does it accomplish what you're looking for? Does it validate?




--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
 
P

Paul

Mike said:
VBScript will only run clientside on a PC with IE- any other
OS/browser combos will not do it
-and if someone is disabling their javscript on an IE-PC, do
you really think they would have vbscripting available to
check?

I still think you should do the page as the non-js-enabled
version, and use a js redirect if js was available/enabled

HI! The reason why is that I dont want a user to bookmark a page which has
flash on it ( such as a flash hybrib site) and go in it without js enabled.
I use flashobject to insert the flash content. I would rather redirect them
to a upgrade page or choose the "without flash" version.

I cannot be the only person with this delema? what if you designed a site
with a javascript verison and a non-javascript version and the user entered
in your javascript version with js enabled at first and boomarked a page in
the javascript enabled site. THEN for some strange reason decided to disable
his/her js and go back into the site using the bookmark.? At this point it
would be convienent to tranp this error and redirect them to some kind of
message "wouldn't it?

Paul

Paul
 
P

Paul

Kathleen said:
Paul:

Try this. First, change the DOCTYPE on your page to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Then in the <head> section of your page; add this:

<meta http-equiv="refresh" content="6; URL=http://www.yourwebsite.com">

The value given to 'content' is the number of seconds before the refresh
will take place; the value given to 'URL' is the page you want your
visitor sent to. You may also want to include a text link to the page in
case your visitor's browser does not support the 'refresh'.

Does it accomplish what you're looking for? Does it validate?

Thanks for responding. NO because I only want to redirect them if javascript
is not detected and also make it validate in w3c.org. Like I said my above
solution does work but it just does not validate. Do you know of another way
to redirect a user on any given page that detects js NOT been enabled and
redirects then to another page?

Paul

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top