473,778 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Howto validet that 2 > 12 from a form

KS
I got 2 inputs in a form where I want check if start > end. Seems like it
just compare the first number when I got this code in javascript
"if(document.al l.start > document.all.en d)"
How do i solve this so it compare 2 > 10 as, is two bigger than ten, and
not, is two bigger than one.
Thanx in advance
Jul 23 '05
17 1563
Thomas 'PointedEars' Lahn wrote:
Grant Wagner wrote:
kaeli wrote:
And get away from IE proprietary document.all syntax, which is AFAIU even
deprecated in IE6.
I'd re-word that as "experience d JavaScript authors in this newsgroup (and
hopefully elsewhere) recommend against using the document.all collection
to access any DOM element".


Oh, so I am not an "experience d JavaScript author" IYHO, thank you.
Be very careful with generalization.


Again, you are being intentionally obtuse. It is entirely obvious one can not
argue against using document.all to access a DOM element where that is the only
mechanism by which to access DOM elements.

I understand now I need to have written: "experience d JavaScript authors in this
newsgroup (and hopefully elsewhere) recommend against using the document.all
collection to access any DOM element where an alternate W3C compliant mechanism
to achieve the same result is available within the user agent environment
because using document.all is a proprietary way of doing this and it would be
better to use a more standards-compliant way for future compatibility and this
is only as long and run on as it is because Thomas Lahn enjoys being
intentionally obtuse and refuses to fill in the unspoken but obvious fact that
one can not reasonably argue against not using document.all when it is the only
mechanism available to the author of the client-side JavaScript running in the
particular user agent and I hope this explains it clearly enough this time".

Hopefully the above is much clearer to you, although with sufficient motivation,
I am sure you can take exception with most of what I have written above, and
given your past behaviour, you appear particularly motivated to take exception
with pretty much anything anyone says.
This is because unfortunately Microsoft's document does not show
document.all as being deprecated.


And support for users with browsers who don't know anything else should be
dropped IYHO? Remember our NN4 discussion lately[1]? I did not recommend
against trying with document.layers although NN4 is clearly deprecated by
Netscape, just wanted to have it given the least possible priority.


Deprecation of the collection does not mean that support for the collection
would be _removed_ from either past, current or even future versions. To quote
from dictionary.com:

dep·re·cate:
1. To express disapproval of; deplore.
2. To belittle; depreciate.

And m-w.com:

dep·re·cate:
1 a archaic : to pray against (as an evil) b : to seek to avert <deprecate the
wrath ... of the Roman people -- Tobias Smollett>
2 : to express disapproval of
3 a : PLAY DOWN : make little of <speaks five languages ... but deprecates this
facility -- Time> b : BELITTLE, DISPARAGE <the most reluctantly admired and
least easily deprecated of ... novelists -- New Yorker>

And whatis.com:

deprecate:
In computer programming, a deprecated language entity is one that is tolerated
or supported but not recommended. For example, a number of elements and
attributes are deprecated in HTML 4.0, meaning that other means of accomplishing
the task are preferred. Deprecated features may become obsolete in future
versions of HTML, though browsers that support the features may continue to
support them.
Note: "to express disapproval of", "supported but not recommended", "other means
of accomplishing the task are preferred".

Microsoft can formally mark document.all as "deprecated " (they have not done
so). This would mean that they "express disapproval of", "support but do not
recommend" and "other means of accomplishing the task are preferred". The
"deprecated feature (document.all) may become obsolete (ie - be removed) in
future versions of their DOM" (to paraphrase the whatis.com definition).

On the other hand, document.layers has _not_ been marked as deprecated, support
for it has been _removed_ from versions of Netscape greater than version 4.xx.
The only way document.layers could be considered "deprecated " would be if it
were still supported in Netscape versions 6 and greater but could potentially
disappear in future versions. Also, use of document.layers is the _only_ means
for controlling any aspect of the Netscape 4.xx DOM as it related to dynamic
content and as such, if you wish to support Netscape 4.xx, support for
document.layers can not be avoided.

document.layers has been obsoleted, not deprecated.
[1] BTW, you really want to refrain from using the HTML composer.


Thank you for the advice. It will be given the consideration it deserves, a
decision will be reached based on that consideration and action will be taken
based on that decision.
Since this is my last reply to these meaningless debates you seem to enjoy
engaging in, I'll get a few things off my chest:

You take exception to a THREE LINE signature. Not only do you take exception to
it, you include 9 lines of USELESS advice about how to prevent a 3 line
signature (if you had checked the headers before providing a link to an Outlook
Express specific solution you would have known it would be of no help). How hard
is it to simply ignore the '--' and two lines that appear after it? Does it not
take significantly more effort to tilt at usenet windmills then to simply ignore
the things that do not fit into your usenet world view? How many resources are
you saving by sending 9 lines of advice about how to avoid a 2 line attribution
to everyone who uses an attribution you disapprove of? Your behaviour, if it
were not so completely insane, would be laughable.

You take exception to the software I chose to use to post to this usenet group
although it generates posts which are in compliance with usenet standards - else
the posts would not appear or propagate. The software I choose to use affects
you in NO WAY WHATSOEVER. It seems self-evident that if '--' appears near the
bottom of a usenet post and the first thing on the next line is a person's name,
everything thereafter is a signature. If your software does not indicate it as
such, perhaps you could use your brain and adjust your reading patterns to stop
reading at the point where you realize the rest of the post is a signature. This
is much the same way it is necessary for me to mentally skip the first couple
paragraphs of your posts where you typical rant about attributions and such.

You are intentially obtuse and demand _every_ _single_ _concept_ _and_ _idea_
_be_ _spelled_ _out_ _down_ _to_ _the_ _last_ _l_e_t_t_e_r_. Anything that goes
unwritten or assumed is an invitation for you to deliberately misunderstand and
find fault with.

Quite frankly, it's exhausting. And although you are an intelligent person, and
have many useful ideas to contribute, you have worn me out with your constant
and deliberate misunderstandin gs and attempts to change others' behaviour in
ways that simply do not matter.

I wanted to avoid being kill filed so as to avoid duplicate replies to questions
(since you would no longer be able to see my reply pointing a poster to the FAQ
for example), but now I simply no longer care.

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq

Jul 23 '05 #11
Grant Wagner wrote:
Thomas 'PointedEars' Lahn wrote:
Grant Wagner wrote:
> kaeli wrote:
>> And get away from IE proprietary document.all syntax, which is AFAIU
>> even deprecated in IE6.
>
> I'd re-word that as "experience d JavaScript authors in this newsgroup
> (and hopefully elsewhere) recommend against using the document.all
> collection to access any DOM element".


Oh, so I am not an "experience d JavaScript author" IYHO, thank you.
Be very careful with generalization.


Again, you are being intentionally obtuse. [...]


Again, you have wasted my time. The last time.
PointedEars
Jul 23 '05 #12
KS
Nice job folks, finally some people with some skills, and the extra info is
great:)
Any books or websites that help people to choose the right code which is not
proprietary and
is more "clean" javascript. The way is should be written. There are many
ways to get the same result, but it might not be the best way.
Jul 23 '05 #13
KS wrote:
Any books or websites that help people to choose the right code which is
not proprietary and is more "clean" javascript. The way is should be
written.
Most books about the topic (both language and DOM) are badly written,
inaccurate and obsolete. Some even do not explain that it is necessary to
test for available DOM features; they just recommend using them, ignoring
the script errors.

Using a proprietary object model rather that a standards compliant one is
nothing more "clean" JavaScript (which is now but a programming language)
than drinking tea rather than coffee -- both contain caffeine, both can be
drunken. At first it must *work* with the target UAs, *then* optimization
can and should be done. The result would be a mixed usage of DOMs, while
testing for each features that is used before it is actually used. This
would include libraries to contain methods for repeated tasks, to ease the
scripting of the frontend and make the calling source code more readable.
There are many ways to get the same result, but it might not be the best
way.


The best way is when it works for as many users as possible/reasonable and
provides graceful degradation for the others. Enforcing standards support
and leaving the users whose software is not recent enough alone with the
problems is not a viable approach; they will just switch site and you have
gained nothing but lost something. Instead, by exploring possibilities of
the preferred object model(s), the user should be convinced that using
software that supports Web standards provides a better experience of the
same Web site than using one that does not support them or does support
them not as complete as the other one does.
PointedEars
Jul 23 '05 #14
JRS: In article <19************ ****@PointedEar s.de>, dated Thu, 12 Aug
2004 23:16:07, seen in news:comp.lang. javascript, Thomas 'PointedEars'
Lahn <Po*********@we b.de> posted :
Grant Wagner wrote:
Thomas 'PointedEars' Lahn wrote:
Grant Wagner wrote:
> kaeli wrote:
>> And get away from IE proprietary document.all syntax, which is AFAIU
>> even deprecated in IE6.
>
> I'd re-word that as "experience d JavaScript authors in this newsgroup
> (and hopefully elsewhere) recommend against using the document.all
> collection to access any DOM element".

Oh, so I am not an "experience d JavaScript author" IYHO, thank you.
Be very careful with generalization.


Again, you are being intentionally obtuse. [...]


Again, you have wasted my time. The last time.


Your attitude here, reminiscent of that of the Geheime Staatspolizei, is
what wastes time here, since it forces us to correct your brutally
rigorous interpretation of elderly recommendations .

Heil Thomas!

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME ©
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demo n.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #15
Any books or websites that help people to choose the right code which is not
proprietary and is more "clean" javascript.


javascript: The Definitive Guide by David Flanagan

Robert
Jul 23 '05 #16
Robert wrote:
Any books or websites that help people to choose the right code which is
not proprietary and is more "clean" javascript.


javascript: The Definitive Guide by David Flanagan


Alas, recent examples here have shown that is belongs to the "bad books"
category.
PointedEars
Jul 23 '05 #17
JRS: In article <14************ ****@PointedEar s.de>, dated Sat, 14 Aug
2004 05:18:50, seen in news:comp.lang. javascript, Thomas 'PointedEars'
Lahn <Po*********@we b.de> posted :
Robert wrote:
Any books or websites that help people to choose the right code which is
not proprietary and is more "clean" javascript.


javascript: The Definitive Guide by David Flanagan


Alas, recent examples here have shown that is belongs to the "bad books"
category.


That is not a constructive response; it does nothing to help KS.

IIRC, it has generally been agreed that all other known books are
considerably worse than Flanagan.

No book should be expected to be perfect.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> JL / RC : FAQ for news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #18

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

Similar topics

4
2873
by: Josef Sachs | last post by:
Is Andrew Kuchling's regex-to-re HOWTO available anywhere? I've found the following (dead) links on various Web pages: http://py-howto.sourceforge.net/regex-to-re/regex-to-re.html http://starship.skyport.net/crew/amk/regex/regex-to-re.html http://www.python.org/doc/howto/regex-to-re/ http://www.amk.ca/python/howto/regex-to-re/ Thanks in advance.
8
1976
by: Sue | last post by:
Hello! I am back with another question. Remember I am a new JavaScript student and I am aware that this code does not check for all the possibilities and that as a "NEW" JavaScript student I am not expected to check for everything. At any rate, the problem I am having with the following code is that it does not clear the fields once I press the SEND button. So can anyone here enlighten me as to what is causing the problem.
5
8846
by: Wilhelm Pieper | last post by:
Hello, HowTo: catch name/value pairs from request.form? My viewstate shows: "__VIEWSTATE=..&111=5.." I want to get this pairs of IDs/names and values . But because the DropDownList ist dynamically created I don't know the name/ID of the created list. I can parse the viewState string to get the related name/value pairs, but I think there will be a more simple way
1
2116
by: John | last post by:
Hi all, I did post this about 10 hours ago thinking I would have received an answer now but it is quite urgent. How do I add a COM object to a web form? I notice there's a primary interop assembly for Office web components and what I'm trying to do here is to create a PivotTable object (which is fine) but then I want to add it to a web page (e.g.
4
3728
by: rob c | last post by:
This is a minor thing and only appears in IE (so far), but I'd like to know to correct it (if possible). Whenever I use a form on a webpage, Explorer always leaves a blank line following the </form> tag but Mozilla doesn't. Is there a way to supress the blank line? Thanks Rob www.rcp.ca
1
3466
by: grabit | last post by:
Hi Peoples i have a search page with a form field "subject" on my results page i have a paging routine . the first page lists its 10 records no trouble but when i click the "next" link i get a error telling me "subject is not defined in form" How can i overcome this please. I will post the page down to the end of the paging routine coz its not very long anyway. <cfquery name="searchResults" datasource="#dsn#"> SELECT threadID, posttype,...
7
9662
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string operation on parameters not passed. Example: Make a TST.asp and post to it as TST.asp?STATE=TEST <%@ Language=JavaScript %> <%
3
4309
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred in \anmeldung2.cfm: line 404
0
9465
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
10127
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
10068
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
8954
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6723
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
5370
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
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
3
2863
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.