Validation Questions

G

gonebye

Cheers,
The w3c validator is giving me errors with
http://wholives.com/index.htm regarding required
attributes with <form, stating that <form> requires the "action" attribute.
Well, pull down menus don't always have the "action=" attribute. None of
the generators I've seen have "action=" either. Any suggestions?

It's also telling me to get rid of valign. any suggestions?

Thanks,
me
 
K

Karl Core

gonebye said:
Cheers,
The w3c validator is giving me errors with
http://wholives.com/index.htm regarding required
attributes with <form, stating that <form> requires the "action"
attribute.
Well, pull down menus don't always have the "action=" attribute. None of
the generators I've seen have "action=" either. Any suggestions?

Add an action to it
It's also telling me to get rid of valign. any suggestions?

Get rid of it
 
D

David Dorward

gonebye said:
The w3c validator is giving me errors with
http://wholives.com/index.htm regarding required
attributes with <form, stating that <form> requires the "action"
attribute.

This is true.
Well, pull down menus don't always have the "action=" attribute.

No, <select> elements don't. <forms> do. If the select element isn't going
to be submitted to the server, then why is it in a <form> in the first
place?

Removing the form isn't a good solution though, it sounds like you are
trying to implement what Dreamweaver[1] calls a "Jump Menu". You really
should have a server side fallback for those, in which case you need a
<form>, and it needs to have an action attribute.

Have a read of http://www.cs.tut.fi/~jkorpela/forms/navmenu.html - its a
good document on the subject.
None of the generators I've seen have "action=" either.
Generators?

It's also telling me to get rid of valign. any suggestions?

Use CSS.

[1] IIRC
 
S

Steve Pugh

gonebye said:
The w3c validator is giving me errors with
http://wholives.com/index.htm regarding required
attributes with <form, stating that <form> requires the "action" attribute.

Yes it's required, otherwise the form has nowhere to submit to and
hence can't possibly work.

I select and option from one of your pulldowns and click submit and it
doesn't seem to be doing anything with the option I selected. Oh I see
you have nine forms but only one submit button. So the first eight
forms with their dropdown menus are useless.

(Hint - JavaScript is optional, you can not rely on it being enabled
in the user's browser.)
Well, pull down menus don't always have the "action=" attribute.

If they're a form they should. But using a form for navigation rather
than for user input is a bad idea.
None of
the generators I've seen have "action=" either. Any suggestions?

Ditch the generators that are generating broken code.
It's also telling me to get rid of valign. any suggestions?

Not on that page it isn't. Where is it telling you this? valign is a
perfectly valid attribute for a number of elements. So either you're
using it on an element that doesn't support it or you've misread the
error message.

Steve
 
G

gonebye

The w3c validator is giving me errors with
attribute.

Yes it's required, otherwise the form has nowhere to submit to and
hence can't possibly work.

They do all work when links are put in them. I dug around on google, and
found pulldown forms with action="". This solves the problem, but I don't
know if it's correct. I also found a usenet post where the webmaster didn't
know what "action" to use, so he just used action="HELP!!!"

The valign was not correctly positioned, changed it to vertical-align and
put it behind style= , and now everything validates....

homey
 
S

Steve Pugh

gonebye said:
They do all work when links are put in them.

How? Where is the script on your server that receives the input and
redirects the browser to the relevant URL?

And how does the user even submit the form with no submit button?

Did you understand what I said about JavaScript?
I dug around on google, and
found pulldown forms with action="". This solves the problem, but I don't
know if it's correct.

That will submit the form to the same URL as that which contains the
URL. Unless that URL is in fact a script running on the server that
either serves out the page with the form or performs a redirect then
the form will still not work.
I also found a usenet post where the webmaster didn't
know what "action" to use, so he just used action="HELP!!!"

There could be a resource on his server called HELP!!! which accepts
the submission of the form but I doubt it. ;-)
The valign was not correctly positioned, changed it to vertical-align and
put it behind style= , and now everything validates....

Great, all you have to do now is make it work.

Steve
 
T

Travis Newbury

gonebye said:
They do all work when links are put in them. I dug around on google, and
found pulldown forms with action="". This solves the problem, but I don't
know if it's correct. I also found a usenet post where the webmaster didn't
know what "action" to use, so he just used action="HELP!!!"
The valign was not correctly positioned, changed it to vertical-align and
put it behind style= , and now everything validates....

Interesting. You are so concerned about validation, yet don't show a
similar concern about usability. That just sounds like a train wreck
coming kinda combination to me.
 
D

David Dorward

That will submit the form to the same URL as that which contains the
URL.

It might - I don't believe the specification allows for a null value for the
action attribute. Different browsers error correct in different ways. IIRC
lynx treats it as action="./".

A proper URL should be specified for all action attributes.
 
S

Steve Pugh

David Dorward said:
It might - I don't believe the specification allows for a null value for the
action attribute. Different browsers error correct in different ways. IIRC
lynx treats it as action="./".

Treating an empty URL as ./ would be more compliant with RFC 1630 _if_
(and it's a big 'if' which has caused long debates here before,
debates which I didn't really follow and have no desire to see start
up again) an empty string can be classed as a URL at all. If it can't
then the HTML spec says regarding the action attribute "User agent
behavior for a value other than an HTTP URI is undefined."
A proper URL should be specified for all action attributes.

Absolutely.

My earlier post was merely descriptive of what often happens and was
not intended to be a recommendation in any way.

Steve
 
G

gonebye

That just sounds like a train wreck
coming kinda combination to me.
-=tn=-


I don't know. What would you recomment? I was just looking at what
others did. It does work. Does Validate and does Operate. Here's the code:

<form name="form2" action="">
<select class="pullmenus" name="menu2" size="1"
onchange="location=document.form2.menu2.options[document.form2.menu2.selecte
dIndex].value;">
<option value="">Pull-Down Menu #2 (targets=_top)</option>
<option value=http://yahoo.com>go to yahoo.com</option>
</select>
</form>
 
G

gonebye

And how does the user even submit the form with no submit button?

No submit button, it's onchange (onclicks). Try it for yourself. I'm still
mystified by action=??????????


<form name="form2" action="">
<select class="pullmenus" name="menu2" size="1"
onchange="location=document.form2.menu2.options[document.form2.menu2.selecte
dIndex].value;">
<option value="">Pull-Down Menu #2 (targets=_top)</option>
<option value=http://yahoo.com>go to yahoo.com</option>
</select>
</form>
 
G

gonebye

Correction: Forgot the quotation marks on URL


<form name="form2" action="">
<select class="pullmenus" name="menu2" size="1"
onchange="location=document.form2.menu2.options[document.form2.menu2.selecte
dIndex].value;">
<option value="">Pull-Down Menu #2 (targets=_top)</option>
<option value="http://yahoo.com">go to yahoo.com</option>
</select>
</form>
 
S

Steve Pugh

gonebye said:
<form name="form2" action="">
<select class="pullmenus" name="menu2" size="1"
onchange="location=document.form2.menu2.options[document.form2.menu2.selecte
dIndex].value;">
<option value="">Pull-Down Menu #2 (targets=_top)</option>
<option value="http://yahoo.com">go to yahoo.com</option>
</select>
</form>

If a user has JavaScript turned off then they will effectively get
this:

<form name="form2" action="">
<select class="pullmenus" name="menu2" size="1">
<option value="">Pull-Down Menu #2 (targets=_top)</option>
<option value="http://yahoo.com">go to yahoo.com</option>
</select>
</form>

Which does nothing at all.

If you don't care about the 15% or so of visitors who have JavaScript
turned off then just say so and we can stop watsing our time trying to
help you and start ignoring you instead.

Steve
 
N

nice.guy.nige

While the city slept, gonebye ([email protected]) feverishly typed...
60 links along the left column is plain ugly.

Then fix your navigation. You don't need 60 links in a menu.

Incidentally, my mouse has a wheel which allows me to scroll down the page,
or to scroll through drop-down lists if they have focus. Thanks to your
onchange event handler scary things happen if I should happen to select one
of the options, then go back to your page and use the wheel to scroll down
the page, forgetting that the list has focus!

Cheers,
Nige
 
M

Michael Wilcox

gonebye said:
60 links along the left column is plain ugly.

Links are *way* more useful. I'd say one of the best reasons is that
Google can read a list of links, but it can't follow a dropdown JS list.
Also, one can use and navigate a list of links much easier than a drop
down menu.

Do you have too many links in one place? Your site already seems to be
sectioned off. Offer links to the main section pages, then further links
from there. Also, make a site map if you're going to have more than 60
documents.

http://www.cs.tut.fi/~jkorpela/forms/navmenu.html#ben
 
T

Travis Newbury

gonebye said:
I don't know. What would you recomment? I was just looking at what
others did. It does work. Does Validate and does Operate. Here's the code:

It doesn't work when you have javascript off. If that is acceptable to
you then go for it.
 
R

Richard

Cheers,
The w3c validator is giving me errors with
http://wholives.com/index.htm regarding required
attributes with <form, stating that <form> requires the "action"
attribute.
Well, pull down menus don't always have the "action=" attribute. None
of
the generators I've seen have "action=" either. Any suggestions?
It's also telling me to get rid of valign. any suggestions?
Thanks,
me



www.4thorder.us

Check out the menu offered.
You can define any number of levels you want with practically anything in
them.
Your use of all those drop down boxes is insane.
 
D

David Dorward

60 links along the left column is plain ugly.

60 links on a single page is generally too much - real links or psudolinks
implemented with a select. I suggest logically grouping them and having
fewer links to a number of index pages.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top