User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 397,581 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,171 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 4763 | Replies: 21
Reply
Join Date: Jun 2006
Location: India
Posts: 6,805
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 338
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: drop down quantity box to update price

  #11  
Nov 2nd, 2007
> The name attribute is now deprecated in the form tag.
'name' attribute is deprecated anywhere outside the 'form' tag. With the name attribute deprecated, how do you propose on accessing the form data server side?

>I must use XHTML.
It's interesting you would want to use something not supported by IE6 and IE7.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Jan 2007
Posts: 2,524
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 105
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: drop down quantity box to update price

  #12  
Nov 4th, 2007
Use id instead of name. I already asked the W3C this question.

The only use of name not deprecated is the grouping of radio buttons.

The choice to use XHTML is not mine to make.

IE7 supports it fairly well. There are only a few places where it doesn't work as defined, and IE7 mangles HTML the same way.
Last edited by MidiMagic : Nov 4th, 2007 at 8:41 pm.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,805
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 338
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: drop down quantity box to update price

  #13  
Nov 5th, 2007
You certainly don't know what you are talking about.

> Use id instead of name.
OK, a bit of refresher. Form values are normally submitted using two methods: GET and POST. In GET, the form data is appended to the URL while in POST, the form data forms a part of the request payload. Despite all these differences, it is a fact that the form data is submitted in the form of 'name / value' pairs and not 'id / value' pairs.

Try this code:
<!-- nameOfThisFile.html -->

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>    
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>OK</title>
</head>
<body id="bodyMain">
    <form action="nameOfThisFile.html" method="GET">
        <div>
        <input type="text" id="txtId" value="OK" />
        <input type="text" name="txtName" value="txtName" />
        <input type="submit" value="Submit" />
        </div>
    </form>    
</body>
</html>

After pressing the submit button, take a look at the URL. Only the form field with the name attribute defined gets submitted.

Plus in case you were wondering, the document is a fully compliant XHTML strict document, which just proves my point that 'name' attribute is NOT deprecated inside form tag for form elements.

> I already asked the W3C this question.
...and misinterpreted their reply.

> The choice to use XHTML is not mine to make.
Wrong. The choice of DOCTYPE to be used definitely lies with the developer developing the web application.

> IE7 supports it fairly well.
"Fairly well" doesn't cut in. And what about IE6. Do you have idea how many people out there still use IE6?

Are you sure you are not trying to misguide the people here? I thought you had already "got the solution from a helpful guy at W3C" according to this thread...
Last edited by ~s.o.s~ : Nov 5th, 2007 at 12:10 pm.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Jun 2005
Location: Troy
Posts: 1,277
Reputation: Rashakil Fol has a spectacular aura about Rashakil Fol has a spectacular aura about 
Rep Power: 7
Solved Threads: 36
Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Salamander Man

Re: drop down quantity box to update price

  #14  
Nov 5th, 2007
You should use 'name' for forms because that has universal support by browsers.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,524
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 105
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: drop down quantity box to update price

  #15  
Nov 6th, 2007
But name is deprecated in XHTML. It won't even work, and the code won't validate. That support will be gone.

Read this portion of a page by W3C:

http://www.w3.org/TR/xhtml1/#h-4.10
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,805
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 338
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: drop down quantity box to update price

  #16  
Nov 6th, 2007
> But name is deprecated in XHTML. It won't even work, and the code won't validate.
The code I posted is valid XHTML.

> Read this portion of a page by W3C:
We don't need to read something we have well understood.

Originally Posted by W3C
HTML 4 defined the name attribute for the elements a, applet, form, frame, iframe, img, and map. HTML 4 also introduced the id attribute. Both of these attributes are designed to be used as fragment identifiers.
[....]
Note that in XHTML 1.0, the name attribute of these elements is formally deprecated, and will be removed in a subsequent version of XHTML.

Anyways, I have had enough of trying to squeeze this simple concept in that brain of yours. If you still disagree with what we have posted, best of luck.
Last edited by ~s.o.s~ : Nov 6th, 2007 at 10:40 am.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Jan 2007
Posts: 2,524
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 105
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: drop down quantity box to update price

  #17  
Nov 7th, 2007
Then tell me why it is that, when I put name attributes into form tags, it returns that there is no such attribute in form tags when I try to validate it in the XHTML 1.0 Strict doctype?

I emailed W3C about it, and they told me the name attribute is deprecated in form tags, but that, until recently, the validator was erroneously not catching it.

I am going to take their word above yours.
Last edited by MidiMagic : Nov 7th, 2007 at 2:32 am.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 943
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 5
Solved Threads: 47
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is online now Online
Posting Shark

Re: drop down quantity box to update price

  #18  
Nov 7th, 2007
form != input..

name is XHTML deprecated as an attribute of the form element, that is <form...>. It's not deprecated on any of the form fields. The validator can't be wrong, it's fed the DTD/schema and it validates the input page; the schema/DTD can't be wrong; because they ARE XHTML 1.0. If the validator program itself was wrong... meh.. it's not.

I guess what people are trying to say is that name is not deprecated on the 'tags that make up forms'. which is a little ambiguous I'll admit.. but, read the posts, look at the context of examples.. name continues to be a valid attribute of input, select, submit and other form fields, and it is indeed needed for those fields to be submitted when the form is.
If it only works in Internet Explorer; it doesn't work.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,524
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 105
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: drop down quantity box to update price

  #19  
Nov 9th, 2007
I agree with that.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Oct 2007
Posts: 24
Reputation: kevindougans is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kevindougans kevindougans is offline Offline
Newbie Poster

Re: drop down quantity box to update price

  #20  
Nov 9th, 2007
Hey there hot heads :-)

how the hell did we get on to the subject of radio boxes?

And eh, which of the above codes should I use to calculate the "total price"?

Thanks!

Kev
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:12 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC