473,491 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help - How can I validate ASP code for XHTML, || NAME vs ID attribute

Hi,

RE: Converting pages including ASP pages for XHTML

My question relates to ASP not ASP.NET - I can't find a newsgroup for ASP
and hoped it was still relevant in ASP.NET - sorry if it's not.

Problem: I am teaching myself about validating for XHTML and, upon testing a
page I get errors for the use of the 'name' attribute in form fields. It
seems that you have to replace the 'name' attribute for the 'id' attribute.
Of course when trying to retrieve the form values in the next page, they
have not been passed because of the lack of 'name' attribute.

So my question is: How can I validate this page for XHTML and still pass the
values to the receiving page?

Many thanks
Simon

Dec 23 '05 #1
1 2432
xhtml still allows the name attribute for form and form elements. the
difference is that the name value, as id must be a valid identifier. (start
with a letter and allow only letters, numbers, underscore, colon, hyphen and
period as valid characters - note: asp.net breaks this rule).

here is a valid xhtml sample:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<body>
<form name="form1">
<input type="submit" value="submit" name="submit" />
</form>
</body>
</html>
-- bruce (sqlwork.com)

"Simon Barnett" <su**@simonbarnett.com> wrote in message
news:xZ*****************@fe3.news.blueyonder.co.uk ...
Hi,

RE: Converting pages including ASP pages for XHTML

My question relates to ASP not ASP.NET - I can't find a newsgroup for ASP
and hoped it was still relevant in ASP.NET - sorry if it's not.

Problem: I am teaching myself about validating for XHTML and, upon testing
a
page I get errors for the use of the 'name' attribute in form fields. It
seems that you have to replace the 'name' attribute for the 'id'
attribute.
Of course when trying to retrieve the form values in the next page, they
have not been passed because of the lack of 'name' attribute.

So my question is: How can I validate this page for XHTML and still pass
the
values to the receiving page?

Many thanks
Simon

Dec 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
4730
by: Haines Brown | last post by:
I have a document with a set of internal links such as: <a name="Z1"></a>... <a name="Z2"></a>... The W3C validator objects to the first instance of the name attribute: There is no attribute...
6
6305
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
7
1850
by: mike | last post by:
Hello, I am kind of new to this javascript stuff and I am constantly having problems trying to get my webpage validated. I have the following <script>printdate();</script> and when I validate it...
9
4175
by: mike | last post by:
Hello, Can some one help me with the problem that I am having to validate this. Here is the code I have: <ilayer name="test34i"><div id="test34"><img src="wavestest.gif"...
10
1417
by: ATeal75 | last post by:
I'm a college student, and I'm having trouble with one of my assignments. We creating a spell checker in javascript that has to compare a user submitted word (using forms) to a 5 word dictionary. ...
14
2116
by: JNariss | last post by:
Hello, I am fairly new to asp and jscript and am now in the process of learning some form validation. I am taking one step at a time by validating each field and testing it before moving onto...
0
5518
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
3
2993
by: cuties | last post by:
Hi all.... i'm very new to this programming language. i'm required to fulfill this task in the company i'm doing my practical. i hope i can get guide for my problem... Here is the script i...
2
6337
by: embz | last post by:
this post concerns three pages. 1. this page: http://www.katherine-designs.com/sendemail.php i get the following errors: a lot of it seems to deal with the PHP code i inserted to the page....
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.