One validation error that I can't figure out!

I had several errors and figured them all out but this one. I tried doing what they are telling me is wrong and it creates another error. Anyway, here’s my problem…I am being told that a required attribute “action” not specified. <form> is where they tell me the problem is and here is the code…


<form>
<input type="button" value=0  style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=0)"><br>
<input type="button" value=1 style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=10)"><br>
 <input type="button" value=2 style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=20)"><br>
<input type="button"  value=3 style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=30)"> <br>
<input type="button" value=4 style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=40)"> <br>
<input type="button"  value=5 style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=50)"><br>
<input type="button"  value=6 style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=60)"><br>
<input type="button" value=7 style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=70)"><br>
<input type="button" value=8  style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=80)"><br>
<input type="button"  value=9 style="color: #0066E7; border: 6px solid #0066E7; background-color: silver;" onclick="(s=90)"><br>
 </form>

What is it exactly they are trying to tell me should be in the form element?

The data entered into a form is normally processed by some kind of program, such as PHP. So forms expect to have an “action” attribute that specifies a link to the script that will process the forum. You can leave it blank if you want:

<form [COLOR="#ff0000"]action=""[/COLOR] method="post">
...
</form>

What is your code meant to do, by the way? Do you really need a form for this? Inline JS like that is not ideal. It’s best to create something that will work (or do something useful) even if JS is off. :slight_smile:

This is a user side variable control for a timer counting speed…0-90ms timeout function call.
It looks good on the page and users like interaction so I gave them a little extra and it works good.
If I leave this blank, will it have a negative impact on page ranking for search engines?
Appreciate the input (pun intended).

I inserted your code into the form element and passed validation! Feels like graduation day haha, they even gave me code for a valid code icon.
Thanks

Try this:


<! doctype html>
<html>
<head>
  ...
  ...
  <style type='text/css'>
    #form_div input
    {
       display:block; margin-bottom:1em; color: #0066E7; border: 6px solid #0066E7; background-color: silver
    }
  </style>
</head>
<body>
  
  <form action="#" method="post">
    <div id='form_div'>   
      <input type="button" value='0'  onclick="(s=0)"  />
      <input type="button" value='1'  onclick="(s=10)" />
      <input type="button" value='2'  onclick="(s=20)" />
      <input type="button" value='3'  onclick="(s=30)" /> 
      <input type="button" value='4'  onclick="(s=40)" /> 
      <input type="button" value='5'  onclick="(s=50)" />
      <input type="button" value='6'  onclick="(s=60)" />
      <input type="button" value='7'  onclick="(s=70)" />
      <input type="button" value='8'  onclick="(s=80)" />
      <input type="button" value='9'  onclick="(s=90)" />
    </div>
  </form>
       
</body>
</html>

Is it possible to see a working version?

John, I tried doing what your code does and failed but mine didn’t work because it was written wrong and I see where I went wrong by looking at yours. I am using an external css style sheet and just couldn’t make it work so I went with the inline style and it works so I’m not gonna “fix” it. I am still a newb at this stuff (my first site) and I will show the site when it’s launched in the next week or so. I would have to give you the home page and the css page for it to make any sense.
I think it looks pretty good but of course I am a little biased, I’ll be sure to post it on this forum when it’s up and running.
I thank you for your time and offering and will try your code in a bit, I am a little burned out on this site right now and need a break from it. Thanks to all who have helped!

Have you tested the page with JavaScript turned off so as to see the page the way somewhere between 5 and 10% of your visitors will see it?

I knew there was something I was forgetting, I must let everyone know that javascript must be enabled.
This entire site is based on the functions of the javascript code and is worthless and senseless without it.
Many of you will probably think it’s a goofy site but many out there will not and that’s what I’m counting on.
I’m waiting on my paypal verification to launch. I opened a new checking account just for paypal. Heard too many horror stories of accounts being shut down to mess up my other checking account, taking no chances there.
Hopefully launching by early next week, I’ll post then. Thanks felgall!
I have been unable to find another site even remotely like mine and hope people enjoy it.

At the end of the day, you are presumably offering up content of some sort, so the ideal is to make that somehow available to everyone—even if the experience isn’t so great with JS off. It may take a little extra effort, but really needn’t do if you start with the content and then add the JS on top of that. It’s an ideal to aim for, anyway.