You are here: Re: Using id or name? « HTML « IT news, forums, messages
Re: Using id or name?

Posted by Jukka K. Korpela on 02/06/06 00:57

Troy Piggins <usenet-0602@piggo.com> wrote:

> I'm having a problem because of this

It's hard to see what "this" is here. You quoted my entire message, but
your question does not seem to relate to anything in it.

> - I have a form that is not
> working correctly when I try to conform with strict xhtml by using
> "id" instead of "name", but works fine but doesn't conform
> (according to the w3c validator) if I use "name".

You didn't post the URL, and you didn't say _where_ you use "name" and
why. The odds are that you are using scripting and use "name" in <form>
element in order to be able to refer to a form in JavaScript. The
modern way is document.getElementById("foo"), for <form ... id="foo">.
Besides, for a page containing a single form, the very old way
document.forms[0] works in practice, and doesn't need "name".

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация