473,805 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ 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 2449
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**@simonbarn ett.com> wrote in message
news:xZ******** *********@fe3.n ews.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
4766
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 "FOO" for this element (in this HTML version). The element is defined not to have this attribute. These anchors are not contained in anything. For example, the Z1
6
6332
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, column 13: there is no attribute "SRC" <bgsound src="C:\My Documents\zingwent.mids"> You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is...
7
1881
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 at validator.w3.org I get a error the attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the...
9
4187
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" alt="test"></div></ilayer> Here is the error it is giving me: You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict"...
10
1435
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. If the word is spelled correctly, all we have to do is say so. If not, we have to suggest a word from the dictionary based on the individual letters of the word, or ask if the user wants to add the word to the dictionary, which would incrememnt...
14
2157
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 the next one to be sure I am correct. I ran into a problem with my validation when I added an else if code to my code. Here is what I tried to do: Form (ITTermination) has a field (EmployeeName) which I would like to validate to check for no...
0
5578
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 ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
3
3022
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 already wrote but i'm having problem to move forward. my problem is : 1. how do i assign each checkbox to have equal value with the value of the d_id?
2
6361
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. as my PHP skills are close to nil, i'm wary about fiddling with it myself. =\ 2. now this page: http://www.katherine-designs.com/contact.php
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10359
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10104
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7645
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6875
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4317
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.