Jump to content

XHTML Form Problem

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

XHTML Form Problem Rate Topic: -----

#1 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 17 April 2007 - 11:29 AM

Hi i am trying to validate my online shop and it does not like the below form:

<form action="index.asp?function=SEARCH" method="post"/>
<input type="text" name="search" size="14" value="Product Search"/>
<input name="submit" type="submit" value="Go"/>
<form/>

the error reads:

Error Line 66 column 10: required attribute "action" not specified.
<form/>

0

#2 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 17 April 2007 - 11:40 AM

That is because you closed your form in the first tag :whistling1:

Notice the piece(s) I highlighted in red, remove it:

<form action="index.asp?function=SEARCH" method="post"/>
<input type="text" name="search" size="14" value="Product Search"/>
<input name="submit" type="submit" value="Go"/>
<form/>

...and change that very last line to </form>

You're only supposed to self-close tags that do not contain anything. In the case above, the form element contains the two inputs.

Those two inputs, though, don't contain anything, so they correctly have self-closing forward-slashes.
0

#3 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 17 April 2007 - 11:45 AM

New Error:

document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

...arch" size="14" value="Product Search"/>

document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
<input name="submit" type="submit" value="Go"/>

This post has been edited by Man2u2uk: 17 April 2007 - 11:46 AM

0

#4 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 17 April 2007 - 12:16 PM

Yup, those two errors state the same thing: inputs need to be placed in some sort of block-level parent element, such as a p element, a div, etc.

So, now here is a bit more modified code for you:

<form action="index.asp?function=SEARCH" method="post">
<div>
<input type="text" name="search" size="14" value="Product Search"/>
<input name="submit" type="submit" value="Go"/>
</div>
</form>
0

#5 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 17 April 2007 - 01:02 PM

Ok i have a new problem,

i managed to fix all of the errors in my code code and successfully converted it to XHTML

i tested my code by using the upload feature and it says, that is XHTML :)


but if i then run the test again using the URL: http://www.ukfishersonlineshop.co.uk

it finds 490 errors :(

i know why this is caused.. ( its because i use ekmpowershop, and all i have to do it is put the tag [ekm:content] anywhere i want my products to show and my products only show once i have uploaded the page to the server....


what should i do?

the page is fine. but the content fails :(
0

#6 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 17 April 2007 - 01:21 PM

It sounds like you are describing that some/much of the page's code is rendered by a CMS, or some outside source that you don't have 100% control over?

If I am right, then I'm afraid you're at the mercy of their code. By making your own code as good as possible, you've done a commendable job and should be proud of yourself.

But, for the code that is outside of your control, well... that is just the way it goes.

The only solution would be to <gulp>change your cms/shop application to one that outputs cleaner, more correct, code</gulp>
0

#7 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 17 April 2007 - 01:25 PM

Thanks,

yes you are correct. all of my code is now successfully XHTML Strict

but the content. (which i do not control) has 490 errors and is not XHTML.

can i still put the successful XHTML logo on??
0

#8 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 17 April 2007 - 01:32 PM

View PostMan2u2uk, on Apr 17 2007, 02:25 PM, said:

Thanks,

yes you are correct. all of my code is now successfully XHTML Strict

but the content. (which i do not control) has 490 errors and is not XHTML.

can i still put the successful XHTML logo on??

To be honest, I would not put that logo on. The page, wholly, isn't xhtml valid.

Again, be proud of your efforts, and in the future, consider migrating to a more code-happy cms solution.
0

#9 User is offline   sypher 

  • the owner3r
  • Group: Administrators
  • Posts: 1,578
  • Joined: 04-April 06
  • Location:North Wales, UK
  • Interests:Art, Boxing, MMA, Graphic Design, Web Design etc. ;)

Posted 17 April 2007 - 05:21 PM

Well done.
Like herk said you should be proud to of put the time and effort in validating the code you can control.

When making websites in the future where you control all the code be sure to follow the same example.
sypher design - North Wales Web Design | Latest Work: - Scala Cinema

CSS - Can't See Sh*t
0

#10 User is offline   benbacardi 

  • Administrator
  • Group: Administrators
  • Posts: 1,140
  • Joined: 06-April 06
  • Gender:Male
  • Location:United Kingdom

Posted 17 April 2007 - 05:58 PM

I know you had massive job on your hands (good to meet you today btw!) and I'd be very proud to change a site that large to a more accessible solution :)
0

#11 User is offline   Catalyst 

  • Codesmith
  • Group: Administrators
  • Posts: 1,049
  • Joined: 04-April 06
  • Gender:Male
  • Location:San Diego

Posted 17 April 2007 - 11:11 PM

I find the whole whatever-compliant logo trend to be kind of silly anyway. The only people that would remotely care are other web designers, the site visitors don't. It's like all those "Gold Award Winner" logos you'd see on sites a few years back that didn't really mean anything. Someone either likes the site or they don't, it either ranks well or it doesn't. Of course I don't have any bumper stickers on my car so I'm not that type of guy.
0

#12 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 18 April 2007 - 01:16 PM

Thanks guys.

i phones up ekm today and they have sent me the css templates for all the shop, so in time i should be able to convert them
0

#13 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 18 April 2007 - 02:00 PM

Wow, that is actually very cool of them, and unexpected I'd bet. Good deal!
0

#14 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 18 April 2007 - 02:15 PM

Well there is only 3 css template files,
  • Catalog Page
  • Product Page
  • Product Spec Page
i am not sure how hard they will be to convert though, i am not that good at css
0

#15 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 18 April 2007 - 02:19 PM

That is why we're here my friend.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users