473,770 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

form element name creates problem

TJS
how can I reference an element name if it has a colon in it ?

example that creates error :
=============== ============
objForm._ctl1:p assword.require d = 1;
Jul 23 '05
13 1623
On Sun, 19 Sep 2004 14:52:38 -0700, TJS <no****@here.co m> wrote:
I saw FAQ 4.13 which showed using quotes so I tried to follow example.
The eval formula shown produced the actual name inside qoutes and it did
work.
However, 4.13 doesn't use eval. If you needed to build a property name,
use string concatenation:

document.forms['my' + 'Form']
But, the short version works too , so I will use that.
The "short" version, as you call it, is the much preferred approach. It is
almost *never* necessary to use eval(). Ever.

Code that uses eval is usually slower and it can be harder to debug. Worse
still, it is frequently used as a hack because it seems to get things
working, when in reality it does nothing but burden the browser.
( I hate bottom posting )


Then you might want to learn to like it. It's an established practice,
especially amongst technical newsgroups. Some will even refuse to respond
to you if you continue to top-post after being told to stop. Bear that in
mind.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #11
On Sun, 19 Sep 2004 22:11:59 GMT, Michael Winter wrote:

(TJS)
( I hate bottom posting )
Then you might want to learn to like it. ..


Interestingly, I would not refer to your own
posting style as 'bottom-posting', because...
[snip]


...this suggests to me that your posting style is more
accurately described as 'in-line with trimming'.

[ 'bottom-posting' is actually something I advise
against in my (Java) FAQ, and the text of the JS FAQ
does not contain the word 'bottom'. It might seem
like an trivial difference, but I have become sick
of reading posts from people who add 1 line at the
bottom of a 140 line post! ]

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 23 '05 #12
On Sun, 19 Sep 2004 22:39:21 GMT, Andrew Thompson <Se********@www .invalid>
wrote:

[snip]
Interestingly, I would not refer to your own
posting style as 'bottom-posting', because...
[snip]
..this suggests to me that your posting style is more
accurately described as 'in-line with trimming'.


It is, but it is my understanding that the style is simply referred to as
bottom-posting. However, if I were to describe to someone how to correctly
post on Usenet, I would say (and have said):

When posting, please write in conversation order; place your
response beneath the text it addresses. Remaining quoted text
which you are not answering should be trimmed. Signatures should
always be removed unless they are being discussed.

I'm usually more terse than that, though.
[ 'bottom-posting' is actually something I advise
against in my (Java) FAQ, and the text of the JS FAQ
does not contain the word 'bottom'.
To truly bottom-post is just as illogical as top-posting. Neither style
allows a reader to tell what parts of a poster's response refers to which
of the preceeding points (did that make sense?).
It might seem like an trivial difference, but I
have become sick of reading posts from people who
add 1 line at the bottom of a 140 line post! ]


I know what you mean. :|

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #13
JRS: In article <10************ *@corp.supernew s.com>, dated Sun, 19 Sep
2004 14:52:38, seen in news:comp.lang. javascript, TJS <no****@here.co m>
posted :
I saw FAQ 4.13 which showed using quotes so I tried to follow example.
The eval formula shown produced the actual name inside qoutes and it did
work.

But, the short version works too , so I will use that.

( I hate bottom posting )

Since the regulars prefer to comply with recognised Usenet standards,
ISTM likely that they will in future not bother to reply to you. You'll
still get replies, but mainly from the ignorant.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of 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 #14

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

Similar topics

1
1505
by: InvisibleMan | last post by:
Thanks in advance for any help... I have a piece of code - viewbasket.asp where variable strProdCode and intQuant are pulled from itemsOrdered table on a Loop from the DB (SQL Server) after they have been added, which it does correctly... <form action="checkout.asp" method="post" id="form1" name="form1">
2
2139
by: skubik | last post by:
I'm curious as to whether it's possible to create a Form object and populate it with form element objects, strictly in Javascript, without the need to apply the form to a document. Essentially, I want to do this: tmpFormObj = new Form(); tmpFormObj.target = document.location; // For example. tmpFormObj.method = "POST";
4
9302
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form action="MaintNotification.php?ReqID=5" method="post" name="frm5"> <tr align="left" bgcolor="#dddddd" class="text" onClick="submit()"
4
2543
by: Howard Jess | last post by:
In Opera 8.01 (Linux; Build 1204) and in Opera 7.54 (Windows XP; Build 3865), my form disappears from the HTML markup (below). To summarize: 1) In a <script> block in the <head> I create a form element (part of object/feature/bug detection). 2) There's a <form> element defined in the <body>, with the id 'theForm'. 3) The onload function tries to access that form, and also counts the total number of forms in the document. It fails to...
1
1765
by: jrmsmo | last post by:
Hi there, I have an interesting problem that maybe you pros can suggest how I solve. I'm working with a third party program that serializes an XML document (it was obviously not designed with schema in mind). I created a schema from this document. It works fine. Except for some unknown reason, in a small part of the XML document, this program switches the order around, and of course the validator I built then fails. Its always the same two...
7
3585
by: Venus | last post by:
Hello, I am trying to generate a dynamic form at runtime and would like to do it using "<asp: ..." form elements as follows Build up the string that is placed somewhere in the HTML code the same way like regular input fields can. strForm = "<form name=""myForm"" runat=""server"">" & vbCrLf strForm += "<asp:button name=""myName"" .... runat=""server"" />" & vbCrLf
25
4073
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
27
4754
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it appears that the data goes straight to the processing page, rather than the javascript seeing if data is missing and popping up an alert. I thought it may be because much of the form is populated with data from the db (lists, etc.), but when I leave...
13
3634
by: johnemmatty | last post by:
I am using an asp page in which i dynamically fill the ACTION property of the form. The problem is that whenever i try to redirect to a html page using the javascript:location, it is getting redirected to the location in the ACTION attribute of the form element despite what is assigned to the location attribute of the javascript. <FORM NAME="CRYSTFORM" METHOD=POST ACTION=<%=thisPage%>> : : :
1
10934
by: gzannd | last post by:
I have a problem with submitting a form to a PHP page through a dynamically created IFRAME in IE7. This code works fine in Firefox. However, IE7 submits an empty form--the correct PHP page is called, but no form variables are passed to the page. Here's the client-side code: //Create or reuse an IFRAME to submit data to a specified page. //commandToken: A string that tells the page what to do. //data: Data that the page will work...
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10099
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
10037
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
9904
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...
0
8931
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
6710
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();...
1
4007
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
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
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.